I am making a quiz app which there are some question:
When the user clicks NEXT QUESTION
, another question will be shown.
I have made the current code:
public void onRadioButtonClicked(View view) {
// Is the button now checked?
boolean checked = ((RadioButton) view).isChecked();
// Check which radio button was clicked
switch(view.getId()) {
case R.id.number_1:
if (checked)
point = 0;
Toast.makeText(this, ""+ point,
Toast.LENGTH_LONG).show();
break;
case R.id.number_2:
if (checked)
point = 1;
Toast.makeText(this, ""+ point,
Toast.LENGTH_LONG).show();
break;
case R.id.number_3:
if (checked)
point = 2;
Toast.makeText(this, ""+ point,
Toast.LENGTH_LONG).show();
break;
case R.id.number_4:
if (checked)
point = 3;
Toast.makeText(this, ""+ point,
Toast.LENGTH_LONG).show();
break;
}
}
How can I make this scenario happen when the NEXT QUESTION
clicked, another question pop up in the same activity?