android 控件 单项选择(RadioGroup,RadioButton)
2014-05-27 21:22
776 查看
1、继承关系和子类:
2、定义:
RadioButton表示单个圆形单选框,而RadioGroup是可以容纳多个RadioButton的容器
3、XML重要属性:
4、重要方法:
5、实战:
布局文件
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="男" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="女" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不確定" />
</RadioGroup>
参考1:http://developer.android.com/intl/zh-cn/reference/android/widget/RadioButton.html
参考2:http://www.cnblogs.com/wt616/archive/2011/06/20/2085531.html
2、定义:
RadioButton表示单个圆形单选框,而RadioGroup是可以容纳多个RadioButton的容器
3、XML重要属性:
4、重要方法:
5、实战:
布局文件
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="男" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="女" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不確定" />
</RadioGroup>
参考1:http://developer.android.com/intl/zh-cn/reference/android/widget/RadioButton.html
参考2:http://www.cnblogs.com/wt616/archive/2011/06/20/2085531.html
相关文章推荐
- Android开发之四(五):常用控件之单项选择(RadioGroup和RadioButton)
- Android 应用开发笔记 - 单项选择(RadioGroup, RadioButton)
- Android控件——RadioButton和RadioGroup
- Android之单选控件RadioGroup,RadioButton使用
- Android控件之CheckBox、RadioGroup、RadioButton
- Android RadioGroup的RadioButton 选择改变字体颜色和背景颜色
- Android-基本控件(CheckBox,RadioGroup,RadioButton)
- android 控件之RadioGroup&RadioButton
- Android控件系列之RadioButton与RadioGroup使用方法
- android 中如何获取radiogroup 中那个radiobutton被选择
- Android开发--控件之RadioGroup、RadioButton、CheckBox、Toast
- 单项选择功能RadioGroup和RadioButton的使用
- Android UI控件之RadioGroup、RadioButton
- Android控件之RadioGroup和RadioButton
- Android控件系列之RadioButton与RadioGroup的基本使用
- Android控件之RadioGroup、RadioButton
- Android开发之RadioGroup与RadioButton控件使用
- Android基本控件RadioGroup和RadioButton学习
- Android常见控件之RadioGroup,RadioButton,CheckBox和Toast
- android基本控件示例RadioButton单选按钮,一般和RadioGroup一起用(03)