Android realizes the function of user login and remembering password
1、 Open the previously completed case_ Login to modify and then edit
2、 Delete the registration button and drag one in front of the login button check@R_ 874_ 2419 @, the edit code is as follows:
In layout_ Edit in the top.xml file
The renderings are as follows:
3、 Edit the login password and remember the password
Write and modify the loginacitvity.java file. The code is as follows:
4、 Design the interface after login
Create a new mainactivity.java file and generate an activity at the same time_ Main.xml, and the effect diagram of coding is as follows:
5、 Result demonstration
Open the software again and remember the password, as shown in the figure:
If you enter the wrong password, you will be prompted, as shown in the figure below:
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.