Toggle Buttons

In this document

Key classes

A toggle button allows the user to change a setting between two states.

You can add a basic toggle button to your layout with the
ToggleButton object. Android 4.0 (API level 14)
introduces another kind of toggle button called a switch that provides a slider
control, which you can add with a Switch object.
SwitchCompat is a version of the Switch
widget which runs on devices back to API 7.