Android Switch Button Tutorial

23:46 Unknown 0 Comments

Android Switch Button:

SwitchCompat is a version of the switch widget which on devices back to API v7. It does not make any attempt to use the platform provided widget on those devices which it is available normally.

A switch is a two state toggle switch widget that can select between two options. The user may drag the thump back or forth to choose the selected option, or simply tap to toggle as if were a checkbox.

XML File:


Activity file:



You can watch video demo here:




0 comments: