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.

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.



package org.remoteui.demo.ui.input;
public enum Decision {
	yes, no, maybe
<RadioGroup orientation="vertical" value="#{decision}">
	<RadioButton value="#{org.remoteui.demo.ui.input.Decision.yes}" text="yes" />
	<RadioButton value="#{}" text="no" />
	<RadioButton value="#{org.remoteui.demo.ui.input.Decision.maybe}" text="maybe" />

RadioGroup Children

The RadioGroup acts like a LinearLayout and arranges all content accordingly. You can mix RadioButtons with other Views as you like.

RadioGroup Attributes

Name Type Default Binding Description

Inherits all attributes from LinearLayout and adds the following:




The property, this RadioButtonGroup is bound to. This receives the values as given in the RadioButton elements.

RadioButton Attributes

Name Type Default Binding Description

Inherits all attributes from TextView and adds the following:



int index of the button

The value that is set to the RadioGroup’s bound property, if this RadioButton is selected. If omitted, the index of this RadioButton in its RadioButtonGroup will be used.





Bindable checked state of the button. Only use this attribute for stand-alone RadioButtons that aren’t part of a RadioGroup.

Parts of this documentation are a derivate of the Android Developer Documentation by Google used under CC-BY-2.5.

results matching ""

    No results matching ""