MOBILE ICP 1 - navyagonug/CSEE5590-WEB-AND-MOBILE-PROGRAMMING GitHub Wiki

PROBLEM STATEMENT

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' buttonin the login screen c.When clicked on 'LOGIN' button, the screen should navigate to welcome screen if the login credentials are valid otherwise app should display an appropriate message to the user d. Create the 'LOGOUT' buttonin the welcome screen e. When clicked on 'LOGOUT' button, the screen should navigate to login screen

APPROACH

To approach this question I have initially installed Android studio.

The mainactivity.java class is already existing. I have created another java class for activity called Homeactivity.java and added this activity in manifest class. the code snippet for both these java files is as follows.

Similarly, the layout xml files snippet is as follows

I have made use of Nexus phone emulator since I do not have an access to an android mobile currently. The output for this is as follows,