The introduction of Android User Interface (UI) Toggle Button

Android Toggle Button (Source Google Images)

Toggle buttons are used to display the status of active and inactive on the button.

XML Attributes ToggleButton:

android: textOff: The text for the current button is not checked

android: textOn: The text for the current button is checked

syntax on the application in layout (xml):

<ToggleButton
        android:id="@+id/togglee"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text=“Master Android Toggle"
        android:textOff="Off"
        android:textOn="On" />

Post Author: Study