Android RadioButtonRadioButton is a two states button which is either checked or unchecked. If a single radio button is unchecked, we can click it to make checked radio button. Once a radio button is checked, it cannot be marked as unchecked by user. RadioButton is generally used with RadioGroup. RadioGroup contains several radio buttons, marking one radio button as checked makes all other radio buttons as unchecked. Example of Radio ButtonIn this example, we are going to implement single radio button separately as well as radio button in RadioGroup. activity_main.xmlFile: activity_main.xml Activity classFile: MainActivity.java Output ![]() ![]()
Next TopicAndroid Dynamic RadioButton
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week