//
//
//
//
//
//
//
//
//
//
软件Tags:
代码介绍:1.远程登录(用户名和密码超过3位长度则成功,在服务器可以自己设置代码)2.含有loading效果(多线程处理,时事返回数据)3.登录不成功能够提示出错原因4.保存登錄后的信息(如用戶名和密碼,可以自己設置)5.具有超级完整详细的注释(新手也能看懂)可以设置成自己的UI库注意:1.需要设置androidManifest文件[code]<activity android:name=".IndexPage" android:label="登陆后的页面" /><activity android:name=".Register" android:label="注册" /> </application><uses-permission android:name="android.permission.INTERNET" />[/code]2.需要编写一个服务器servlet代码[code]String userName = request.getParameter("userName"); String password = request.getParameter("password"); System.out.println(userName+"-"+password); DataOutputStream dos = new DataOutputStream(response.getOutputStream()); if (userName != null && password != null) { if (userName.length() > 3 && password.length() > 3) { dos.writeInt(16); }else{ dos.writeInt(0); } } else { dos.writeInt(0); } dos.flush();dos.close();[/code]3.别望了配置web.xml(如果是jsp则可以不用配置)4.需要在Login.class中的内部类LoginFailureHandler的run方法中的validateURL(验证用户名和密码的URL)

