This library provides you cool reveal animation on toggle

Overview

RevealSwitch

Android Arsenal

This library provides you cool reveal animation on toggle.

g_20181001_0205015

Dependency

Step 1: Add Jitpack repository to your root(project) build.gradle at the end of repositories.

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2: Add gradle dependency to your module's build.gradle.

dependencies {
  implementation 'com.github.Akashkamble:RevealSwitch:1.0.1'
}

Usage

Add RevealSwitch to your layout like file like this

">
<com.akash.RevealSwitch
  android:id="@+id/revealSwitch"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  .../>

To add the toggleListener add following code

switch.setToggleListener(object : OnToggleListener{
    override fun onToggle(isEnable: Boolean) {
       Log.e("TAG","isEnabled ? $isEnable")
    }
 })

To change color of enabled track (default color #444444)

screenshot_20181001-013416-02

Add this in xml

app:setEnabledTrackColor="#FF1744"

Add this in Kotlin or Java

switch.setEnabledTrackColor(Color.parseColor("#FF1744"))

To changle color of disabled track (default colot #FFFFFF)

screenshot_20181001-014628-01

Add this in xml

app:setDisabledTrackColor="#FFFFFF"

Add this in Kotlin or Java

 switch.setDisabledTrackColor(Color.parseColor("#FFFFFF"))

To add the animation duration (default 500ms)

Add this line in xml

app:setAnimationDuration="700"

Add this in Kotlin or Java

switch.setAnimationDuration(700) //Accepts value between 500ms to 1500ms

Added in version 1.0.1

To show the border (default false)

Add this line in your layout file.

app:showBorder="true"

Default border color will be thumb color.

To set borer color

Add this line in xml

app:borderColor="#FF1744"
You might also like...
[] Android library for using the Honeycomb animation API on all versions of the platform back to 1.0!

DEPRECATED NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applic

Android library to control Transition animates. A simple way to create a interactive animation.
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

FPSAnimator is very easy animation library for Android TextureView and SurfaceView.
FPSAnimator is very easy animation library for Android TextureView and SurfaceView.

FPSAnimator A simple but powerful Tween / SpriteSheet / ParabolicMotion / animation library for Android TextureView and SurfaceView. Features The cont

Android library to make notes drop animation for music players
Android library to make notes drop animation for music players

VusikView Min SDK 11 Screnshots How to use If you want use this library, you can download project and import it into your workspace and add the projec

User onboarding library with smooth animation of objects and background colors
User onboarding library with smooth animation of objects and background colors

SlidingTutorial Cleveroad introduces Sliding Tutorial Library for Flutter Hey guys, hope you haven’t started developing a tutorial for your Flutter ap

An simple & awesome animation library written in Kotlin for Android
An simple & awesome animation library written in Kotlin for Android

An simple & awesome animation library written in Kotlin for Android

Android library to control Transition animates. A simple way to create a interactive animation.
Android library to control Transition animates. A simple way to create a interactive animation.

TransitionPlayer Android library to control Transition animates. A simple way to create a interactive animation. Demo1 SimpleTransition Code: ....

A fluent Android animation library
A fluent Android animation library

ViewAnimator A fluent Android animation library ! Usage Animate multiple view from one method ViewAnimator .animate(image) .transla

Android Library to create Lottie animation view dialog easily with a lot of customization
Android Library to create Lottie animation view dialog easily with a lot of customization

LottieDialog Android Library to create Lottie animation view dialog easily with a lot of customization Why you should use Lottie Dialog You have no li

Releases(1.0.1)
Owner
Akash Kamble
Android developer | Kotlin ❤ | Noob Flutter Dev
Akash Kamble
It's a cool animation which can use in splash or somewhere else.

What's Particle ? It's a cool animation which can use in splash or anywhere else. Demo Article 手摸手教你用Canvas实现简单粒子动画 Attributes name format description

巴掌 1.4k Dec 12, 2022
Sophisticated and cool intro with Material Motion Animation

☯️Sophisticated and cool intro with Material Motion Animations(No more viewpager transformer)

Ranbir Singh 34 Sep 8, 2022
ViewAnimator view with a lollipop style reveal effect

ViewRevealAnimator Widget ViewAnimator view with a lollipop style reveal effect. Regular animation can be set (just like the default ViewAnimator) for

Alessandro Crugnola 339 Jun 3, 2022
This library provides easy ways to add onboarding or pager screens with different animation and indicators.

WalkThroughAndroid Make amazing OnBoarding Screens easily for your app with different colorful animations, fonts, styles, and many more. Customize you

MindInventory 33 Sep 9, 2022
Android Animation Easing Functions. Let's make animation more real!

Android Easing Functions This project is originally from my another project, AndroidViewAnimation, which is an animation collection, to help you make

代码家 2.5k Jan 4, 2023
Lightweight Android library for cool activity transition animations

Bungee min SDK 16 (Android Jellybean 4.1) written in Java A lightweight, easy-to-use Android library that provides awesome activity transition animati

Dean Spencer 172 Nov 18, 2022
☯️Sophisticated and cool intro with Material Motion Animations(No more viewpager transformer or Memory leak)

Material Intro Sophisticated and cool intro with Material Motion Animations. Who's using Material Intro? ?? Check out who's using Material Intro Inclu

Ranbir Singh 34 Sep 8, 2022
Road Runner is a library for android which allow you to make your own loading animation using a SVG image

Road Runner Road Runner is a library for android which allow you to make your own loading animation using a SVG image Sample video View in Youtube Dem

Adrián Lomas 1.2k Nov 18, 2022
🪐 Jetpack Compose animation library that allows you to implement animations such as shared element transition.

Orbitary ?? Jetpack Compose animation library that allows you to implement animations such as shared element transition. Download Gradle Add the depen

Jaewoong Eum 503 Dec 30, 2022
🪐 Jetpack Compose animation library that allows you to implement animations such as shared element transition.

?? Jetpack Compose animation library that allows you to implement animations such as shared element transition.

Jaewoong Eum 504 Jan 2, 2023