What are the advantages and disadvantages of membrane structures.pptx
MobileAppDev Handout#2
1. Mobile Application Development
T. S. Indi, IT Department, WIT Solapur Page 1
Handout#2
Problem Statement: Design and implement “Login Form” App using
android UI elements.
Design: Design Login Application to accept User Name and password.
Design two buttons “Submit” and “Reset”. On click of submit button
display message as per validation done. On click of reset button set
values in two text boxes (username and password) to empty string.
Steps:
1. Design Android App for Login UI accepting UserName and Password
from user
2. Two buttons “Submit” and “Reset” in layout.
3. On click of “Submit” button display message “Clicked on Submit
button…” implement using OnClickListener()
4. On click of reset button set empty string to username and password
EditText boxes.
Guidelines:
1) Button is created using <Button> tag in a layout file as show below
2. Mobile Application Development
T. S. Indi, IT Department, WIT Solapur Page 2
<Button android:id = “@+id/button1”
…… android:text=“Submit”/>
2) We can access the Button created in a layout resource using the
findViewById(int) method
Other Approach (Optional): Design Android App for Login UI accepting
UserName and Password from user and “Submit”, “Reset” and Cancel
buttons using the android:onClick resource in layout xml file.
Guidelines:
<Button android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_marginTop="49dp"
android:layout_toRightOf="@+id/textView1"
android:onClick="buttonCancelClick"
android:text="Cancel" />
[Reference: Book -“Mobile Apps Development” by Anubhav Pradhan, Anil V Deshpande]