Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Set-up: 1. Creste a new Android project with an empty activity 2. Create a new Empty Activity called DisplayActivity 3. Create a Java file

image text in transcribed
Project Set-up: 1. Creste a new Android project with an empty activity 2. Create a new Empty Activity called "DisplayActivity" 3. Create a Java file called Account Design: 1. Open activity_main.xmt and add the following widgets: a. An Edittext (Piain Text) called edaName b. An Edittext (Plain Text) called editEmail c. ACheckBox calied chilsubscribe d. A fution called btnsubmit 2. Open activity_display amil and add the following widgets: a. A Textview called betName b. A Buttien called btnReturn code: 1. Open Account,java and add the following peivate variables: private String name: private String email; private boolean issubscribed; 2. Add getten and setters for all member variables HINT: Press Altwinsert and choose Getters and Setter and select all variables 3. Open MainActivity java and add variables for alf of the 4 widgets you created [R EditTexts, 1 CheckBox, 1 Buttion) 4. Inside onCreate use findview llyld to get references to all the variables matching the coerect IDs 5. Set the onclicktistener for btnlleturn and inside it perform the following task: a. Ceestruct an Account object b. Set the values of the Account object based on the tent from the fdefert and the checked atatus of the Checkiax Account a = nes Account(); a. setsubscribedchisub-1scheckes( ) ) c. Create an intent object which you will use to go to DiplayActivity d. Use the Intent's putfxtra method to pass the String for the Emain fied e. Start a new Activity (switch to Displayictivity) 6. Open DisplayActivity java and add variables for the TearView tuttmail and Burton btnfieturn 7. Inside oncreate use fingviewbyld to get references to all the variables using the correct IDs 8. Create a String variable called passedName and assign to it the value passed from the Intent using getintentl) zetstringfatra 9. Display the passed string insibe the TeutView tutimall 10. Create an ceclicktistener for the Button which simply switches us back to the MainActivity using am Intent (no need to pass any data, jast iwitch) End Result: You should have an app that functions as follows. When you fill out the foem and press the button, it witches to the Displnefctivity where the TextView shows the email that the user entered

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

4. Identify the stage of the road of trials in The Wizard of Oz.

Answered: 1 week ago