my button has a string id
<RadioButton
android:id="@+id/Dirty"
android:text="Very Dirty"
and I would like to use the name Dirty in my code but I cant use get Text since the display name of the radio button is different from what I need and get Id returns an integer.
Any suggestions on how to get the "Dirty" from my selected radio button?
Thanks.
Code (from comments)
RadioButton rb = (RadioButton) findViewById(selectedId);
String sel = (String) rb.getText();