Question
Please send me the code for this whole thing I don't want any explanation this is for android studio please his lab, you will recreate
Please send me the code for this whole thing I don't want any explanation this is for android studio please
his lab, you will recreate the following image using different layouts.
One should only use LinearLayouts. Call it "activity_main_linear.xml".
One should only use a GridLayout. Call it "activity_main_grid.xml".
One should only use a ConstraintLayout. Call it "activity_main_contraint.xml". Row 1: The top item is a
Add an 'onClickListener' to the "Press Me" button so that when it is pressed, it will put the current text of the EditText into the TextView. It should also createa Toast when clicked to tell the user that the "Label has been updated." The toast message should be translated into other languages so you should use getResources.getString(R.string.toast_message) to get the
Add a check changed listener to the Checkbox to show a Snackbar which says, "The checkbox is now", followed by "off" if the Boolean parameter is false, or "on" if the Boolean is true. Add an "Undo" action button to the Snackbar which sets the checkbox back to its original state. You should be able to dothis using the two parameters of onCheckChanged(CompoundButton cb, boolean b){ ...
//In the Snackbar's setAction( ):
Snackbar.setAction( "Undo", click -> cb.setChecked(!b);
}
Ensure that all strings (including those in the Toast and Snackbar) are translated into French. You can use Google Translate since you will not be marked on correctness of your translations.
Hints:
You will have to use multiple LinearLayouts nested within each other. You can control the orientation with the "android:orientation" tag.
In a GridLayout, set layout_weight="1" and gravity="fill" to make the objects use the entire grid box. Also, use layout_rowSpan="2" to make an object use 2 grid boxes.
Step by Step Solution
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