Question: this code makes my application crash on android studio. its supposed to give a button called Next_page the functionality to move the app to a

this code makes my application crash on android studio. its supposed to give a button called Next_page the functionality to move the app to a different activity but whenever i run the app and press on the button the app crashes. what is the issue with the code? and how could i fix it? public void onRadioButtonClicked(View view){ Intent intent; intent = null; boolean checked = ((RadioButton) view).isChecked(); switch(view.getId()){ case R.id.Dominos_button: if(checked){ switch (view.getId()){ case R.id.Next_page: intent = new Intent( this, GarciaOrderActivity.class); startActivity(intent); default: break; } } case R.id.LittleCaesars_Button: if(checked){ switch (view.getId()){ case R.id.Next_page: intent = new Intent( this, GarciaOrderActivity.class); startActivity(intent); default: break; } } case R.id.PizzaHut_Button: if(checked){ switch (view.getId()){ case R.id.Next_page: intent = new Intent( this, GarciaOrderActivity.class); startActivity(intent); default: break; } } default: break; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!