Switch A material Switch with icon animations and color transitions May 03, 2018 1 min read Material Animated Switch A material Switch with icon animations and color transitions. Sample app: Based on Inbox Pinned by Derek Torsani How to use By default show the inbox pinned switch <com.github.glomadrian.materialanimatedswitch.MaterialAnimatedSwitch android:id="@+id/pin" android:layout_width="wrap_content" android:layout_height="wrap_content" /> XML With custom colors and icons attributes <com.github.glomadrian.materialanimatedswitch.MaterialAnimatedSwitch android:id="@+id/pin" android:layout_width="wrap_content" android:layout_height="wrap_content" app:base_release_color="@color/md_deep_orange_900" app:base_press_color="@color/md_deep_orange_50" app:ball_release_color="@color/md_deep_orange_500" app:ball_press_color="@color/md_white_1000" app:icon_release="@drawable/ic_play_arrow_white_36dp" app:icon_press="@drawable/ic_stop_deep_orange_500_36dp" /> XML Remember put this for custom attribute usage xmlns:app="http://schemas.android.com/apk/res-auto" Java For Gradle Add repository repositories { maven { url "http://dl.bintray.com/glomadrian/maven" } } Groovy Add dependency compile 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar' Groovy GitHub SwitchMaterial Design
UI An Android library that lets you implement MaterialPreferences on Setting UI An Android library that lets you implement customizing MaterialPreferences on Setting UI by Battle Entertainment. 05 May 2018
Switch Custom Switch With Animation In jetpack COmpose Custom Switch With Animation In jetpack COmpose 09 December 2023
Color Material design 3 custom colors with Jetpack Compose Material design 3 custom colors with Jetpack Compose 25 September 2023