2
I’m trying to make a screen where the user would have to choose between the options on <RadioButton and if he chooses the right one counts for the right one and otherwise for the wrong one, having finished, after clicking on "Reply" the same is in the print and the piece of code below:
public void onClickView(View rdio){
int qnt_certo = 0, qnt_errado = 0;
RadioGroup rd_group = (RadioGroup) findViewById(R.id.perguntas);
switch (rd_group.getCheckedRadioButtonId()){
case R.id.rd_btn1:
qnt_errado = qnt_errado+1;
break;
case R.id.rd_btn2:
qnt_errado = qnt_errado+1;
break;
case R.id.rd_btn3:
qnt_certo = qnt_certo +1;
break;
case R.id.rd_btn4:
qnt_errado = qnt_errado+1;
break;
}
}
But the part where I found it difficult was to manipulate the information, I’ll explain:
I want after the user choose and click on Answer back that <RadioGroup would be blocked, so he could not change his choice and his "vote" accounted for.
My difficulties:
1- Know when and what the user chose.
2- Block the <RadioGroupwhen he Answer back
3- Send information to another activity for it to have a percentage of right and wrong
4- After choosing the <RadioButton change color (if right or wrong)
