简体   繁体   中英

Login screen: Save username and password

After deciding to get some exposure to android app, i started playing with it but being new to java and new environment is a good learning curve. However after many hours I was able to get the basic android app going. Now I have another dilemma. I dont have a login screen. I can connect to database just fine but I want users to enter their login one time when they start the app. I have these questions

  1. Any good tutorials that I can find where there is a login screen that I can add on top of the work I already got done and once they login, they get directed to those files

  2. How do I set the menus. Like if the users setup the login one time and later on they want to change it and use another login, how would I go about setting those?

Any links to good tutorials about this will be very appreciated

If they are logged into the app and wan to logout and in with another user name, I would recommend creating a menu option to Sign Out which would take them back to the login screen. http://developer.android.com/guide/topics/ui/menus.html

For the login screen itself, you could use a LinearLayout or RelativeLayout . It's really up to you, though.
http://developer.android.com/resources/tutorials/views/index.html

As far as links to tutorials, the two above would likely help, but they don't necessarily cover exactly what you're wanting. Google can always be a good friend, though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM