Question: MainActivity.java This activity is responsible for setting up buttons for all the incomplete tasks in the TaskManager's ArrayList. If the user clicks on a task
MainActivity.java
This activity is responsible for setting up buttons for all the incomplete tasks in the TaskManager's ArrayList. If the user clicks on a task button, they will be navigated to a new page, and the task id will be passed to the new page.
What is the correct class signature for the MainActivity.java?
Group of answer choices
public class TaskActivity extends AppCompatActivity
public class TaskActivity extends AppCompatActivity, OnClickListener
public class MainActivity extends AppCompatActivity implements View.OnClickListener
public class MainActivity extends OnClickListener implements AppCompatActivity The following figure shows the main activity view. Three buttons are created for incomplete tasks. The buttons are named by concatenating the string "Task" with the incomplete taskid.
What is required to pass a task id from the MainActivity.java to another class eg TaskActivity.java Select all the correct answers.
Incomplete Tasks Intent intent new IntentMainActivitythis, TaskActivity.class;LinearLayout.LayoutParams buttonProperties new
LinearLayout.LayoutParamsLinearLayoutLayoutParams.MATCHPARENT,
ViewGroup.LayoutParams.WRAPCONTENT;Toast.makeTextthis task.getID Toast.LENGTHSHORTshow;intent.putExtrataskID taskIDClickedtrim;startActivityintent
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
