nUISwitchButton
com.softwareag.mobile.runtime.nui.nUISwitchButton
Use to display a single switch that may optionally have a text label.
Usage Notes
Based on the platform, the
nUISwitchButton exhibits different behavior and appearance.
The
nUISwitchButton will always have two states,
on (true) and
off (false).
The default state of a
nUISwitchButton is
off, which corresponds to 0 (zero), false, or clear.
Additional methods are provided to change the state of the
nUISwitchButton that accept and return boolean values.
Example
This code sample displays two types of switch. The first has a text label, and the second does not. Details on how the labelled switches are rendered on various platforms follow the code sample.
view.add(new nUISwitchButton(NUIID_LABEL_SWITCH,"nUISwitchButton"));//with label
view.add(new nUISwitchButton(NUIID_SIMPLE_SWITCH)); //without label
Platform | Platform-Specific Class and Visual Reference |
Android | android.support.v7.widget.SwitchCompat |
iOS | UISwitch |