
Android toggle button
To display checked/unchecked or On/Off state on the button, the Android Toggle Button can be used. When we need to change the settings between two states, like On/Off Sound, Wifi, Bluetooth, etc, the Android Toggle Button is recommended.
XML Attributes of ToggleButton class:
XML Attribute | Uses |
android:disabledAlpha | It represents the alpha to apply to the indicator when disabled. |
android:textOff | It represents the text for the button when it is not checked. |
android:textOn | It represents the text for the button when it is checked. |
