Building Mobile Enterprise Applications : webMethods Mobile Designer Native User Interface Reference : Native User Interface (NativeUI) Objects : nUISwitchButton
nUISwitchButton
com.softwareag.mobile.runtime.nui.nUISwitchButton
Use to display a single Switch that may optionally have a text label.
Usage Notes
*The nUISwitchButton class extends the nUIButtonElement class.
*Based on the platform, the nUISwitchButton exhibits different behaviour 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. Illustrations of how the labelled switch are rendered on various platforms follows 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 Illustration
Android
android.support.v7.widget.SwitchCompat
Off
On
iOS
UISwitch
Off
On
Windows Phone
Microsoft.Phone.Controls.ToggleSwitch
Off
 
On
Windows RT Windows 8
Windows.UI.Xaml.Controls.ToggleSwitch
 
Off
On
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback