user3777343
user3777343

Reputation: 51

Slide to Unlock Animation in Android

I want to create the "slide to unlock" animation that is found on iPhones, on my Android application. Basically have a running wave-like color animation through a textview. Any ideas? Thanks for any help!

Upvotes: 3

Views: 1109

Answers (1)

Display name
Display name

Reputation: 1761

https://github.com/RomainPiel/Shimmer-android

Information on how to use it is in the wiki.

But for the sake of completion:

Add a ShimmerTextView to your layout:

<com.romainpiel.shimmer.ShimmerTextView
    android:id="@+id/shimmer_tv"
    android:text="@string/shimmer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#444"
    android:textSize="50sp"/>

To start the animation:

shimmer = new Shimmer();
shimmer.start(myShimmerTextView);

You may want to keep track of the shimmer instance after the animation is started if you want to stop it.

To stop it:

shimmer.cancel();

Enjoy :D

Upvotes: 2

Related Questions