Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Android programming:(java) Create a Magic8Ball app. The app will have an ImageView, a TextView and a Button. Use your last name + .com as the

Android programming:(java)

Create a Magic8Ball app. The app will have an ImageView, a TextView and a Button. Use your last name + .com as the Company Domain. For example: green.com. Do the following:

  1. Create an array containing all possible answers from the Magic8Ball.

"It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Signs point to yes.", "Yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."

2. When the user presses the Ask button the app should display a random answer. Write a method named askMagic8Ball that will execute when the button is pressed. Use the SecureRandom class to generate a random array index for the answer. Display the answer in the TextView. 3. Download the magic8ball.jpg file from Canvas and place it in the res/drawable folder in your project. Then add an ImageView to the layout. You can look ahead to chapter 20(an android studio layout editor constraintLayout Tutorial) sections 20.3(preparing the layout editor envirnoment) and 20.4(adding the widgets to user interface) to see how to do this. 4. Be sure to test your app in the emulator before submitting.image text in transcribed

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

4. Write goals down and regularly monitor progress.

Answered: 1 week ago