I have a RadioGroup
with two RadioButton
s in it. In the code, I want to know which of the buttons was selected. Here is the way to find out that information using Android API:
int index = group.indexOfChild(group.findViewById(group.getCheckedRadioButtonId()));
Pure elegance…