iOS Theme Switch on Android
Don’t you ever feel that you want spice it up your Switch layout? Here’s a style that you can customise to look like how iOS does it for their Switches.
Fret not, there’s no libraries involved. Everything is done natively Android!
Before that, here’s a shout out to a Medium article that guided me on how easily that you customise your Android Switch thumb and tracks.
I’ve just added a few changes and just a few spins of my own. Hopefully, it can help you make your app look incredible!
Android’s Switch actually allows you to customise the layout quite easily by updating these two attributes.
- android:thumb
- app:track
Thumb Attribute
This is the circle drawable that user and toggle it, basically just make it a big round circle and add the states for state_checked
true and false.
So, it will style it accordingly when the Switch is toggled.