Working on an education android app. One provides answers through EditText
input, radio buttons and CheckBox
.
I want a check for the RadioGroup
that when no RadioButton
is clicked it will prompt the student and prevent submission. I succeeded in EditText
but unsucessful for RadioButton
.
public void checkEmptyButtons(View view){
RadioGroup rg = (RadioGroup) findViewById(R.id.myRg);
if (rg.getCheckedRadioButton()==-1{
// this is where I have a problem
//I don't even know how to search on the //dev.anderoid site
}
}
That's where am stucked. Thanks in advance .