[英]how to android textview marquee getDuration?
I have time many try TextView marquee animation scroll need marquee animation duration, finish Listener plz help me...我有很多时间尝试 TextView 跑马灯 animation 滚动需要跑马灯 animation 持续时间,完成听众请帮助我...
You can create animation and animation time like this in anim
res/anim/marquee.xml
您可以在
anim
res/anim/marquee.xml
中创建 animation 和 animation 时间
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromXDelta="100%"
android:toXDelta="-100%"
android:duration="10000"
android:repeatCount="infinite"
android:repeatMode="restart"
android:interpolator="@android:anim/linear_interpolator"/>
</set>
and call it where you are using your textView
并在您使用
textView
的地方调用它
TextView myTextView = (TextView) findViewById(R.id.myTextView);
Animation marquee = AnimationUtils.loadAnimation(this, R.anim.marquee);
myTextView.startAnimation(marquee);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.