RadioButton和RadioGroup的关系:
1、RadioButton表示单个圆形单选框,而RadioGroup是可以容纳多个RadioButton的容器
2、每个RadioGroup中的RadioButton同时只能有一个被选中
3、大部分场合下,一个RadioGroup中至少有2个RadioButton
4、大部分场合下,一个RadioGroup中的RadioButton默认会有一个被选中,并建议您将它放在RadioGroup中的起始位置
5、默认选中一个radiobutton,可以在xml文件中设置属性android:checked="true"
注意:可以通过设置如下属性可以使单选按钮在显示文本的右边
RadioButton和CheckBox的区别:
1、单个RadioButton在选中后,通过点击无法变为未选中
2、一组RadioButton,只能同时选中一个
3、RadioButton在大部分UI框架中默认都以圆形表示
1540

被折叠的 条评论
为什么被折叠?



