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.
Смотрите видео Android Tutorial 38 - Radio Buttons - Pick One, just One онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Here Now 24 Март 2014, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7,058 раз и оно понравилось 24 людям.