ICP8 - Pranathi-07/WebMobile_spring2021 GitHub Wiki
Mobile ICP8(Introduction to android studio)
Name :Pranathi Nalluri
Student id: 16301706
Understand the starter code given for text view, button view, and make a simple login application with the following requirements.
a.The main activity should look as below (make suitable changes for the login app!).
b.Create the 'Login' button on the login screen
c.When clicked on the 'Login' button, the screen should navigate to the welcome screen if the login credentials are valid. Otherwise, the app should display an appropriate message to the user
d.Create the 'LOGOUT' button on the welcome screen
e.When clicked on the 'LOGOUT' button, the screen should navigate to the login screen
1.Installed Android-Studio and created new Android application.Below is the main activity XML
2.Content Xml consists of the login page content which are edit text for user name and password, Button for login functionality. Onclick() function is in the corresponding MainActivity.java file checks for the empty values and returns the empty flag else logs in for correct credentials.
3.Home page consists a text, profile picture and logout button which redirects to the login screen again. Image is linked from @drawable and text strings from /values. OnClick() function in the corresponding HomeActivity.java gets us back to login screen by logging out.