Use a Switch widget to let a user choose between two mutually exclusive choices or states, similar to the Switch control on an iPhone .
The Switch widget displays the value that is currently in effect. Slide the control to select or reveal the other value.
To learn how to use this widget programmatically, refer Kony Visualizer Widget guide.
Note: The Switch widget is supported on iOS, Android, and Windows platforms, both Native and SPA.
The following are important considerations for a Switch widget:
Look properties define the appearance of the widget. The following are the major properties you can set:
For descriptions of the properties available on the Look tab of the Properties pane, see Look.
Skin properties define a skin for the widget, including background color, borders, and shadows. If the widget includes text, you can also specify the text font.
For the Switch widget, you can apply a skin and its associated properties for the following states:
Skin | Definition |
---|---|
Normal | The default skin of a widget. |
Focus | The skin applied when the focus is on a widget. |
Thumb Color |
The color of switch's slider button. This property is available under BackGround when you fork the skin for iPhone Native, and also when you fork the entire form for Android Native. |
Tint Color |
This property is available under BackGround only when you fork the skin for iPhone Native. |
For more information about applying skins, see Understanding Skins and Themes.
Switch properties specify properties that are available on any platform supported by Kony Visualizer, and assign platform-specific properties.
Lets you toggle the switch colors.
Specifies the text to be displayed on the left portion of the switch.
Specifies the text to be displayed on the right portion of the switch.
Actions define what happens when an event occurs. On a Switch widget, you can run an action when the following events occur:
For more information, see Add Actions.
The following table summarizes where a Switch widget can be placed:
Widget | Switch placement inside a widget |
---|---|
Flex Form | Yes |
VBox Form | Yes |
FlexContainer | Yes |
FlexScrollContainer | Yes |
HBox | Yes |
VBox | Yes |
ScrollBox | Horizontal
Orientation - yes Vertical Orientation- Yes |
Tab | Yes |
Segment | Yes |
Popup | Yes |
Template
|
Header- No Footer- No |
Rev | Author | Edits |
8 | SHS | SHS |
Copyright © 2013 Kony, Inc. All rights reserved. |