| java.lang.Object | ||
| ↳ | com.neomades.ui.View | |
| ↳ | com.neomades.ui.RadioGroup | |
A RadioGroup is a group of RadioButton.
It ensures that only one button in the group is checked at the same time.
When a RadioButton is added to the group it is always unchecked.
RadioButton of the group can be checked or unchecked in source code
using setChecked(boolean) or put all unchecked using
clear().
By default, a RadioGroup is stretched in MATCH_PARENT in width and
MATCH_CONTENT in height. It ensures that the RadioGroup height will
grow as items are added into it.
In Android, a RadioGroup is a android.widget.RadioGroup.
It will contain android.widget.RadioButton ( see
RadioButton ). There is nothing "physical" that represents the group
by default. Use background methods (such as setBackgroundImage(int))
to customize the group visual aspect.
In iOS, a RadioGroup is a UITableViewController with
style UITableViewCellStyleDefault. This default style will
represent the RadioGroup as a table with rounded corners. Each items
will be separated by lines. Using a customized background will replace the
default style (the default border and lines will be hidden). It will contain
UITableViewCell (see RadioButton).
|
[Expand]
Inherited XML Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.neomades.ui.View
| |||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.neomades.ui.Alignment
| |||||||||||
From interface
com.neomades.ui.StretchMode
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
RadioGroup()
Constructs a RadioGroup with no RadioButtons inside.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| RadioGroup |
addButton(RadioButton button)
Adds a radio button to this group.
| ||||||||||
| void |
clear()
Clear the selection.
| ||||||||||
| RadioButton |
getSelected()
Returns the current selected item of this
RadioGroup. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.neomades.ui.View
| |||||||||||
From class
java.lang.Object
| |||||||||||
Constructs a RadioGroup with no RadioButtons inside.
Adds a radio button to this group.
| button | the button to add |
|---|
| CrossThreadException | if the method is called from outside the UI-Thread |
|---|
Clear the selection. All items of the group are set unselected.
| CrossThreadException | if the method is called from outside the UI-Thread |
|---|
Returns the current selected item of this RadioGroup.
null if none is selected