Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Build an android application called ToastCounterHW with the following components The ToastCounterHW app consists of two Activities: 1. Main Activity a. Keep the name
Build an android application called ToastCounterHW with the following components The ToastCounterHW app consists of two Activities: 1. Main Activity a. Keep the name above b. It's a count up activity MainActivity: Widgets -Button : Toast Display a Toast Message - TextView: Displays the one number that goes up if "Count Up" button is clicked Button: Count Up When clicked the numbers goes up 0 Count Up Go to Count Down Toast 0 Teast 1 Count Up Go to Count Down 1 2 3 4 Button: Go to Count Down, when clicked Send the number displayed to the Second Activity Hint: use a. Intent to send the last number in the count up (4 is the last number in this example) to the second activity 2. Second Activity b. the method startActivityForResult() go to the second activity (since the main activity will expect a result back) Second Activity (Count Down Activity): Widgets TextView: Display a Title: "Count Down Activity" a. Change its name to Count Down Activity b. It's a count down activity TextView: Displays the number received from the MainActivity (4 in this example) Button: Count Down When clicked the number goes Down Count Down Activity 4 Count Down Go back 4 Count Down Go back Count Down Activity 4 Count Down Go back Count Down Activity 3 Count Down Go back Count Down Activity 2 Count Down de back Button: Go Back, when clicked Send the last number displayed to the MainActivity (1 in this example) Count Down Activity 1 Count Down Go back at Hint: use a. Intent to send the number to the MainActivity b. the method setResult() to send the A to MainActivity c. call finish() method 3. back to Main Activity a. The received result (1 in this example) will be displayed into the TextView If Button Count Up is clicked the numbers goes up. so on and so forth TeatCounter Toast To 1 Count Up Go to Count Down Toast 1 Count Up Go to Count Down Toast 2 Count Up Go to Count Down
Step by Step Solution
★★★★★
3.33 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started