Radio
Last updated
Last updated
A Radio
button is a button that can be either checked or unchecked. A user can tap the button to check or uncheck it. It can also be checked from the template using the checked property
Use an element with a RadioGroupController attribute to group a set of radio button. When radio buttons are inside a RadioGroupController, just one radio in the group can be checked at any time. If a radio button is not placed in a group, they will all have the ability to be checked at the same time
To see the complete sample, go to github
Type
Name
Description
int
checkColor
Set to the color of the check, if you want to make it different of the foreground color
boolean
leftJustify
Set to true to left justify this control if the width is above the preferred one
int
checkColor
Sets the text color of the check
Tipo
Nome
Descrição
Constructor
Radio(String Text)
Creates a radio control displaying the given text
Constructor
Radio(String text, RadioGroupController radioGroup)
Creates a radio control with the given text attached to the given RadioGroupController
RadioGroupController
getRadioGroup( )
Returns the RadioGroupController that this radio belongs to, or null if none
String
getText( )
Gets the text displayed in the radio
boolean
isChecked( )
Returns the checked state of the control
void
setChecked(boolean checked)
Sets the checked state of the control
void
setChecked(boolean checked, boolean sendPress)
Sets the checked state of the control, and send the press event if desired
void
setText( )
Sets the text
See also our quick tutorial video showing how to use Radios.
See the JavaDocs for more information.