Android7.0中文API -- RadioGroup

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/RadioGroup.html


RadioGroup

public class RadioGroup
extends LinearLayout

java.lang.Object
   ↳android.view.View
    ↳android.view.ViewGroup
     ↳android.widget.LinearLayout
      ↳android.widget.RadioGroup


This class is used to create a multiple-exclusion scope for a set of radio buttons. Checking one radio button that belongs to a radio group unchecks any previously checked radio button within the same group.
这个类用于创建容纳一组单选按钮的容器,用户只能选中其中的一项。选择属于一个RadioGroup的一个单选按钮,并取消选择同一组中前面已选择的单选按钮。

Intially, all of the radio buttons are unchecked. While it is not possible to uncheck a particular radio button, the radio group can be cleared to remove the checked state.
最初,所有的单选按钮都是未被选择的。虽然不可能取消选择一个特定的单选按钮,但是可以清除RadioGroup来删除已选择的状态。

The selection is identified by the unique id of the radio button as defined in the XML layout file.
选择是通过在XML布局文件中定义的单选按钮的惟一id来标识的。

XML Attributes
XML属性

See RadioGroup Attributes, LinearLayout Attributes, ViewGroup Attributes, View Attributes
请参考RadioGroup AttributesLinearLayout AttributesViewGroup AttributesView Attributes

Also see LinearLayout.LayoutParams for layout attributes.
参考LinearLayout.LayoutParams了解布局属性。

See also:
另请参考:

摘要


嵌套类

classRadioGroup.LayoutParams

This set of layout parameters defaults the width and the height of the children to WRAP_CONTENT when they are not specified in the XML file. 
这组布局参数默认设置子项的宽度和高度为WRAP_CONTENT,当这些属性没有在XML文件中指定。 

interfaceRadioGroup.OnCheckedChangeListener

Interface definition for a callback to be invoked when the checked radio button changed in this group. 
此接口定义了一个回调,当此组中的单选按钮的选择状态发生改变时调用。 

XML属性

android:checkedButton单选按钮的ID,其默认在单选按钮组中被选中。 

继承XML属性

From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View

继承常量

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/RadioGroup.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值