as part of my application I have to create four radioButtons within a radiogroup and get the radio button clicked. I wrote the following code but my selectId attribute gives values 2131034181 when first option is selected and 2131034182 when second option is selected and so on, there's change in unit digit of value when 3 and 4 are clicked. Why is it so?
int selectId=rbg.getCheckedRadioButtonId();
RadioButton selected= (RadioButton) rbg.findViewById(selectId);
String selected_user = (String) selected.getText();