完整内容,请查看: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 Attributes
,LinearLayout Attributes
,ViewGroup Attributes
。 View Attributes
Also see LinearLayout.LayoutParams
for layout attributes.
参考LinearLayout.LayoutParams
了解布局属性。
See also:
另请参考:
摘要
嵌套类 | |
---|---|
class | RadioGroup.LayoutParams This set of layout parameters defaults the width and the height of the children to |
interface | RadioGroup.OnCheckedChangeListener Interface definition for a callback to be invoked when the checked radio button changed in this group. |
XML属性 | |
---|---|
android:checkedButton | 单选按钮的ID,其默认在单选按钮组中被选中。 |
继承XML属性 | |
---|---|
![]() android.widget.LinearLayout
| |
![]() android.view.ViewGroup
| |
![]() android.view.View
|
继承常量
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/RadioGroup.html