Switch Control

Switch Control

Download PDF

Switch Control

A Switch is a two-state toggle switch control that can select between two options. Switch Control is an accessibility feature. It basically displays user, the state of activity as Active/Inactive, thus providing him with the choice to perform as per the requirement.


Configure.IT provides you this functionality in the form of ready to use control. The user may drag the thumb/finger back and forth to choose the selected option, or simply tap to toggle.

    Keywords:
  • switchboard
  • switch
  • switch configuration
  • switch control
  • switch converter
  • switchgear
  • switch case

Properties

  • CIT Custom Properties
    PARAMETER
    DESCRIPTION
    On Image

    This property sets image for switch ON state.

    Off Image

    This property is for setting image for switch OFF state.

    background image

    Sets the image in the Background.

    On Text

    This property is for setting text for switch ON state.

    Off Text

    This property is for setting text for switch OFF state.

    Switch Thumb Tint Color

    The color used to tint the appearance of the thumb. Color for switch thumb.

    Switch Off Tint Color

    The color used to tint the appearance of the switch when it is turned off.

  • Display
    PARAMETER
    DESCRIPTION
    Enabled

    A Boolean property that indicates whether the gesture recognizer is enabled.

    User Interaction Enabled

    Enables the Interaction with user, i.e. control responds when user taps on it.

    Alpha

    Used to set the transparency to the object which ranges from 0 to 1.

    Background Color

    Used to set the background color to the Switch Control.

  • Object
    PARAMETER
    DESCRIPTION
    Xpos

    Sets the X position of the Switch Control.

    YPos

    Sets the Y position of the Switch Control.

    Width

    Sets the width of the Switch Control.

    Height

    Sets the height of the Switch Control.

    Object ID

    Sets unique identifier for the control. Control can be referenced with name set in this property for configuration.

    Object Parent ID

    Set "Object ID" of Switch Control which contains this control or can serve as parent.

    Key Name To Data

    Sets the web service key from data received from web server, which corresponds to the value to be displayed on the control.

    On

    This property is for setting default state for switch. If this property is enabled switch will be in ON state else it will be in OFF state.

    On Tint Color

    This property is for setting tint color for switch ON state.

  • Horizontal
    PARAMETER
    DESCRIPTION
    Horizontal Group

    Group of horizontal android default properties.

    Reference Type

    Reference type is the the default property to set selected view with respect to other view.

    Reference Value

    Reference object that is used for positioning selected object.

    Offset Type

    marginLeft : Specifies extra space on the left side of this view. This space is outside this view's bounds.
    marginRight : Specifies extra space on the right side of this view. This space is outside this view's bounds.

    Offset Value

    Offset Value defines the extra space value in the pixel.

    Center Horizontal

    This property centers the child horizontally with respect to the bounds of its parent view.

    Apply Horizontal Custom Properties

    If any of the horizontal layout setting parameter(s) are selected then this value is selected to indicate user applied horizontal custom layout setting parameter(s).

  • Vertical
    PARAMETER
    DESCRIPTION
    Vertical Group

    Group of vertical android default properties.

    Reference Type

    These are the android default properties to set selected view with respect of other view.

    Reference Value

    Reference object that is used for positioning selected object

    Offset Type

    marginTop : Specifies extra space on the top side of this view. This space is outside this view's bounds.
    marginBottom : Specifies extra space on the bottom side of this view. This space is outside this view's bounds.

    Offset Value

    Value define the extra space value in pixel.

    Center Vertical

    This property centers the child vertically with respect to the bounds of its parent view.

    Apply Vertical Custom Properties

    If any of the vertical layout setting parameter(s) are selected then this value is selected to indicate user applied vertical custom layout setting parameter(s)

  • Display/AdvanceText
    PARAMETER
    DESCRIPTION
    Hide

    Hiding an element can be done by checking ‘Hide’. This property lets you hide the control.


    Advance - Sets auto resizing with respect to superview, for Switch Control.

  • Layout Setting
    PARAMETER
    DESCRIPTION
    Default Min Width

    The width of the view cannot be less than the given value.
    If user select “Default Min Width” then android default value is taken otherwise it takes 0dp.

    Default Min Height

    The height of the view cannot be less than the given value.
    If user select “Default Min Height” then android default value is taken otherwise it takes 0dp.

    Layout Height

    Sets the height of the view
    match_parent/fill_parent : Takes the height as its parent view
    wrap_content : Takes the height as its content’s height

    Center In Parent

    This property centers the child vertically with respect to the bounds of its parent view.

    Layout Width

    Sets the width of the view
    match_parent/fill_parent : Takes the width as its parent view
    wrap_content : Takes the width as its content’s width

    Left

    The padding is expressed in pixels for the left, top, right and bottom parts of the view. Padding can be used to offset the content of the view by a specific amount of pixels.


    For instance, a Left value of 2 will push the view's content by 2 pixels to the right of the left edge.

    Right

    For instance, a Right value of 2 will push the view's content by 2 pixels to the left of the right edge.

    Top

    For instance, a Top value of 2 will push the view's content by 2 pixels to the bottom of the top edge.

    Bottom

    For instance, a Bottom value of 2 will push the view's content by 2 pixels to the top of the bottom edge.

    Horizontal

    Group of horizontal android default properties.

    Vertical

    Group of vertical android default properties.

    Apply Custom Properties

    If any of the layout setting parameter(s) are selected then this value is selected to indicate user applied custom layout setting parameter(s).

Actions

  • Value Changed

    The changed event is sent to an element when its value changes.

Remarks

  • Value Changed

    You can configure actions that has to be performed when uses switches ON/OFF switch control. On state change (ON/OFF) ‘Value Changed’ event will be triggered. So you need to configure your actions in switch control ACTION(S) >> ‘Value Changed’ event.