Android7.0中文文档(API) --- RadioButton

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

RadioButton

public class RadioButton
extends CompoundButton

java.lang.Object
   ↳android.view.View
    ↳android.widget.TextView
     ↳android.widget.Button
      ↳android.widget.CompoundButton
       ↳android.widget.RadioButton
已知的直接子类


A radio button is a two-states button that can be either checked or unchecked. When the radio button is unchecked, the user can press or click it to check it. However, contrary to a CheckBox, a radio button cannot be unchecked by the user once checked.
单选按钮是一种特殊的双态按钮,其有选中和为选中2种状态。当单选按钮未被选中,则用户可以按下或点击它,以选中它。然而,与CheckBox不同的是,用户一旦选中了它,就不能取消对它的选中。

Radio buttons are normally used together in a RadioGroup. When several radio buttons live inside a radio group, checking one radio button unchecks all the others.
通常多个单选按钮在一个RadioGroup中一起使用。当多个单选按钮在一个RadioGroup中是,选中一个单选按钮,则其它的单选按钮将被取消选中。

See the Radio Buttons guide.
请参考Radio Buttons

XML attributes
XML属性

See CompoundButton Attributes, Button Attributes, TextView Attributes, View Attributes
请参考CompoundButton AttributesButton AttributesTextView AttributesView Attributes

摘要



继承XML属性

From class android.widget.CompoundButton
From class android.widget.TextView
From class android.view.View

继承常量

From class android.widget.TextView
From class android.view.View

继承字段

From class android.view.View

Public构造方法

RadioButton(Context context)
RadioButton(Context context, AttributeSet attrs)
RadioButton(Context context, AttributeSet attrs, int defStyleAttr)
RadioButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public方法

CharSequencegetAccessibilityClassName()

Return the class name of this object to be used for accessibility purposes.
返回此对象的类名,用于辅助功能目的。

voidtoggle()

Change the checked state of the view to the inverse of its current state
将视图的选中状态更改为与当前状态相反的状态。

If the radio button is already checked, this method will not toggle the radio button.
如果单选按钮已经被选中,此方法将不会切换单选按钮。

继承方法

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值