我使用库 com.tomer.fadingtextview 对 textview 进行淡入淡出动画,它工作正常,但我想在几秒钟后停止该动画。我应该怎么办 ?
活动主文件
<com.tomer.fadingtextview.FadingTextView
android:id="@+id/headline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="150dp"
android:fontFamily="@font/goingforward"
android:textColor="@color/Denim"
app:texts="@array/title"
android:textStyle="bold"
android:textSize="40sp"
android:textAllCaps="false"
app:timeout="500"/>
你可以TextView
animation
用这种方式在几秒钟后停止你的:
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
fadingTextView.stop();
}
}, Time_TO_STOP);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句