Toggle
Custom Switches for Android
Installation
- Library is also Available in MavenCentral, So just put this in your app dependencies to use it:
Usage
-
Start by adding a Switch (eg.
LabeledSwitch
) in your xml layout as: -
To the reference of Switch in your Activity/Fragment class set a Toggle Event Handler to it as below:
That's It. All your switching callbacks would be handled in
onSwitched
method, parameterisOn
will provide the current state of the switch.
Switches Available
- Labeled Switch | Designed by - Shweta Gupta
- Day Night Switch | Designed by - Ramakrishna V
Developed by
Angad Singh