@@ -19,7 +19,7 @@ Use radio buttons to:
1919* If available options can be collapsed, consider using a dropdown menu
2020 instead, as it uses less space.
2121
22- ![ Settings menu with radio buttons for ringtones ] ( assets/radiobutton/radiobutton_hero .png )
22+ ![ Settings menu with radio buttons] ( assets/radiobutton/radiobutton .png )
2323
2424** Contents**
2525
@@ -75,45 +75,38 @@ API and source code:
7575
7676### Radio buttons example
7777
78- The following example shows a radio button group with five radio buttons.
78+ The following example shows a radio button group with three radio buttons.
7979
80- ![ Example radio button group with 5 radio buttons, the first one is selected and
81- the last one is disabled.] ( assets/radiobutton/radiobutton_example.png )
80+ ![ Example radio button group with 3 radio buttons, the first one is selected] ( assets/radiobutton/radiobutton_example.png )
8281
8382In the layout:
8483
8584``` xml
8685<RadioGroup
87- android : id =" @+id/radioGroup"
88- android : checkedButton =" @+id/radio_button_1"
86+ android : checkedButton =" @+id/enabled_selected"
8987 android : layout_width =" match_parent"
9088 android : layout_height =" wrap_content" >
9189 <RadioButton
92- android : id =" @+id/radio_button_1 "
90+ android : id =" @+id/enabled_selected "
9391 android : layout_width =" match_parent"
9492 android : layout_height =" match_parent"
95- android : text =" @string/label_1" />
93+ android : enabled =" true"
94+ android : paddingStart =" @dimen/padding_start"
95+ android : text =" @string/radiobutton_text" />
9696 <RadioButton
97- android : id =" @+id/radio_button_2"
9897 android : layout_width =" match_parent"
9998 android : layout_height =" match_parent"
100- android : text =" @string/label_2" />
99+ android : checked =" false"
100+ android : enabled =" true"
101+ android : paddingStart =" @dimen/padding_start"
102+ android : text =" @string/radiobutton_text" />
101103 <RadioButton
102- android : id =" @+id/radio_button_3"
103104 android : layout_width =" match_parent"
104105 android : layout_height =" match_parent"
105- android : text =" @string/label_3" />
106- <RadioButton
107- android : id =" @+id/radio_button_4"
108- android : layout_width =" match_parent"
109- android : layout_height =" match_parent"
110- android : text =" @string/label_4" />
111- <RadioButton
112- android : id =" @+id/radio_button_5"
113- android : layout_width =" match_parent"
114- android : layout_height =" match_parent"
115- android : enabled =" false"
116- android : text =" @string/label_5" />
106+ android : checked =" false"
107+ android : enabled =" true"
108+ android : paddingStart =" @dimen/padding_start"
109+ android : text =" @string/radiobutton_text" />
117110</RadioGroup >
118111```
119112
0 commit comments