sketchub icon

MaterialSwitch Libary

SYTStudio
17 Likes
10 Comments
124 Downloads

Screenshots

About

New Simple Material Switch Libary By Me only can be used on LinearLayout here is how

Step 1: Make Switch final MaterialSwitch ms = new MaterialSwitch();

Step 2: Use Listed Blocks ms.setBackgroundColor(int); default: 0xFFE0E0E0 ms.setThumbColor(int); default: 0xFFFFFFFF ms.setToggledBackgroundColor(int); default: 0xFF2979FF ms.setToggledThumbColor(int); default: 0xFFFFFFFF ms.setWidth(int); default: 75 ms.setHeight(int); default: width / 2 ms.enableAnimations(boolean); true/false ms.setDuration(int); default: 250 ms.isToggled() -> boolean: get is toggled

Step 3: Create ms.create(your_linear, MainActivity.this);

Enjoy 😉

©2024 Sketchub | User Policy