Answers for "how to get data from radio group in android"

2

how to get data from radio group in android

// get selected radio button from radioGroup
            int selectedId = radioGroup.getCheckedRadioButtonId();

            // find the radiobutton by returned id
            radioButton = (RadioButton) findViewById(selectedId);

            Toast.makeText(MyAndroidAppActivity.this,
                radioButton.getText(), Toast.LENGTH_SHORT).show();
Posted by: Guest on October-15-2020

Code answers related to "how to get data from radio group in android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language