Skip to content Skip to sidebar Skip to footer

Radio Buttons In Android Studio

I want to have list of radio buttons and after i select one and click next I would like to perform different actions depending on which button was pressed. i am trying currently to

Solution 1:

call g.getCheckedRadioButtonId on next Button click which return currently selected rado button id in RadioGroup:

            public void onClick(View v) {
             int selected = g.getCheckedRadioButtonId();

             test.setText(String.valueof(selected));

            }

Post a Comment for "Radio Buttons In Android Studio"