The following method gets the Id of the currently checked Radio Button.
-
getRadioButtonId()
-
getCheckedRadioButtonId()
-
getCheckedId()
-
None of above
Reveal answer
Fill a bubble to check yourself
B
Correct answer
Explanation
getCheckedRadioButtonId() is the correct RadioGroup method to retrieve the ID of the checked RadioButton. getRadioButtonId() and getCheckedId() are not standard Android methods. The claimed answer B is correct.
AI explanation
getCheckedRadioButtonId() is the method used to retrieve the ID of whichever radio button is currently selected within a RadioGroup, since radio buttons are mutually exclusive and only one can be checked at a time. Made-up method names like getRadioButtonId() or getCheckedId() don't reflect the actual API for this purpose.