滑动解锁Android中的动画



我想在iPhone和我的Android应用程序上创建"滑动解锁"动画。基本上,通过文本视图运行波浪状的彩色动画。有什么想法吗?谢谢你的帮助!

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

有关如何使用它的信息在wiki中。

但为了完成:

在布局中添加ShimmerTextView:

<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"/>

开始动画:

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

如果你想停止它,你可能想在动画开始后跟踪微光实例。

停止:

shimmer.cancel();

享受:D

最新更新