我是Android新手,我尝试制作翻译动画。
这是我的 xml 代码:(rail.xml)
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="100%p"
android:toXDelta="0"
android:duration="4000" />
这是我的java代码:
final Animation animShow = AnimationUtils.loadAnimation( this, R.anim.rail);
for(int i = 1; i < 5; i++ ){
animShow.setRepeatCount(i);
textTV.setText("Hello Android!!");
textTV.startAnimation(animShow);
}
我想问一下,如何更改每个动画重复的文字?