Android Tutorial 38 - Radio Buttons - Pick One, just One

Published: 24 March 2014
on channel: Code Here Now
7,058
24

This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...

Find out how to use a RadioButton.

Things to Remember
-------------------------------
1. RadioButtons should be placed inside a RadioGroup.

2. The RadioGroup is a subclass of the LinearLayout, so you can use the orientation and weight properties.

3. You can have multiple RadioGroups inside the same layout but, you can select only one RadioButton in each RadioGroup.

4. You can use View.OnClickListener as well as an OnCheckedChangeListener with your RadioButton.

5. RadioGroup.getCheckedRadioButtonId() returns the id of the checked RadioButton. If none is checked, then -1 is returned instead.


Watch video Android Tutorial 38 - Radio Buttons - Pick One, just One online without registration, duration hours minute second in high quality. This video was added by user Code Here Now 24 March 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,058 once and liked it 24 people.