Write steps to develop a User Interface for login (Assume two textboxes labelled as Username & Password and two buttons labelled as Submit and Cancel).

Subject: Mobile Computing

Difficulty: Medium

Marks: 6 Marks

1 Answer

Open eclipse:

  1. Click the menu File ,New Android Application Project
  2. Name the project: In this stage, there exist three names described as: Specify Application Name, Project Name, Package name.
  3. Click Next
  4. Configure Launcher Icon
  5. Choose Blank Activity Click next
  6. It will display Activity Name and Layout Name Click finish
  7. In Activity_main.xml file under text field folder we can see the different types of text fields for providing text, password, numbers, email-id etc.
  8. Drag the desired text field on the graphical layout of the GUI and enter the desired input in respect to the type of text filed
  9. Select another text field and provide the input
  10. From the form widgets menu select the buttons you want and rename it as required.

Output: To run User Interface application launch AVD (Android virtual Device)

  • Open project's activity files from eclipse and click Run icon from the toolbar. Eclipse installs the app on your AVD and starts it and if everything is fine with your setup and application, it will display following Emulator window.
  • You can also run this application directly on your android device instead of AVD,
  • First you need to enable USB debugging on your phone, then connect it to your computer via USB. Then eclipse will automatically start debugging on your phone instead of the AVD.
Please log in to add an answer.