Android自学笔记之RadioGroup和RadioButton的使用

来源:互联网 发布:linux 系统下载 编辑:程序博客网 时间:2024/05/13 19:33
1.单独一个RadioButton选择之后无法取消,而CheckBox可以取消,因此不建RadioButton单独使用
RadioGroup与RadioButton:
1 RadioGroup是RadioButton的一个集合,提供多选一机制。
2 属性:
android:orientation=""
vertical 垂直排布
horizontal 水平排布

决定当前RadioButton以什么方式排布!

<RadioGroup

    <RadioButton

         android:text="男";

            />

     <RadioButton

        

           android:text="女";

            />

   />

1 0