Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do it on Android Studio. Chapter 1 Assignment In this challenge, you will use Snackbar to display a message of Correct! or Incorrect! replacing

Please do it on Android Studio.

image text in transcribed

Chapter 1 Assignment In this challenge, you will use Snackbar to display a message of "Correct!" or "Incorrect!" replacing the Toast class in chapter 1 . (The Toast class is old.) However, the location is only at the bottom left screen. Refer to the Snackbar class definition at: Snackbar | Android Developers Step 1: You can just replace Toast.makeText(MainActivity.this,"Correct!",Toast.LENGTH_SHORT).show(); with Snackbar.make(view,"Correct!",Snackbar.LENGTH_SHORT).show(); Then, you will make the True and False buttons grey out and disabled. You can use mTrueButton.setEnabled(false). Note: Make sure you import the necessary Snackbar class. The Snackbar message allows you to swip out of the screen. Step 2: The Snackbar has more functions such as creating a button on the message. But you need to have a that wrap the original LinearLayout. You need to create an id for the CoordinatorLayout. In the MainActivity, you need to create an CoordinatorLayout variable that binds the CoordinatorLayout using findViewByld() method. Then, the following statements can create a click button on the message. Snackbar snackbar = Snackbar.make(mLayout, "You answered the question!",Snackbar.LENGTH_LONG ) .setAction("UNDO", new View.OnClickListener() \{ @Override public void onClick(View view) \{ I/leave the button enabled \} 3); snackbar.show(); Please refer to How to add a Snackbar in Android - GeeksforGeeks for more information. We want to provide an opportunity for the user to undo the answer. Things to submit: 1. a zipped folder that contains all the project files and folders. 2. screen shots of the successful execution of your app

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_2

Step: 3

blur-text-image_3

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

Understand how to design effective service guarantees.

Answered: 1 week ago

Question

Know when firms should not offer service guarantees.

Answered: 1 week ago