找回密码
 立即注册
theLogin登录Loading | android开发 2022-11-07 63 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android实现远程登录功能,含有进度条loading登录效果,登录后台告诉更新UI线程,首要关于登录失败,告诉UI线程更新界面,检测用户登陆,服务器通过DataOutputStream的dos.writeInt(int);来判别是否登录成功(服务器回来intgt;0登陆成功,不然失败),登陆成功后依据isRememberMe来判别是否保存密码(用户名是会保存的),假如连接服务器超越5秒,也算连接失败.几点说明:1.远程登录(用户名和密码超越3位长度则成功,在服务器可以自己设置代码)2.含有loading效果(多线程管理,时势回来数据)3.登录不成功可以提示犯错原因4.保存登錄后的信息(如用戶名和密碼,可以自己設置)注意:1.需求设置androidManifest文件2.需求编写一个服务器servlet代码3.别望了配置web.xml(假如是jsp则可以不必配置)4.需求在Login.class中的内部类LoginFailureHandler的run方法中的validateURL

(Android implements the remote login function, including the progress bar loading login effect. The login background tells the UI thread to update. First, the UI thread tells the UI thread to update the interface and detect the user's login. The server uses the dos of DataOutputStream writeInt(int); To determine whether the login is successful (if the server comes back intgt; 0, the login is successful, otherwise it fails). After the login is successful, determine whether to save the password according to isRememberMe (the user name will be saved). If the connection to the server exceeds 5 seconds, It is also considered as a connection failure. Several instructions: 1. Remote login (user name and password exceed 3 bits in length, which means success. You can set the code on the server) 2. It contains loading effect (multi-threaded management, when the situation returns data) 3. If the login is unsuccessful, you can prompt the reason for the error 4. Save the information after login (such as user name and password, which can be set by yourself) Note: 1. The requirement is to set the androidManifest file. 2. The requirement is to write a server servlet code. 3. Don't look to configure web.xml (if it is a jsp, you don't need to configure it). 4. The requirement is to set the validateURL in the run method of the internal class LoginFailureHandler in Login.class)

[下载]11590387876.rar




上一篇:Android俄L斯方块代码
下一篇:android版是男人撑过二十秒源码