[英]“Slide to unlock” text animation on Android, looking like in iOS
有沒有辦法在Android上制作類似於iOS動畫的“滑動解鎖”文本動畫?
這是此問題的真實答案:
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();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.