2013-03-23 61 views
-1

我需要做同样在最后电影显示人们对电影的所有信息的,的Android动画的TextView慢了

我需要一个字符串往上走,随后,其他,并在屏幕上重复结束字符串再次。

有些事情是这样的。


       string1 

          string2 

          string3 


       string 2 

          string 3 

          string 1 


       string 3 

          string 1 

          string 2 

但我需要用缓慢的运动来改变。

回答

3

所以你想要流动的动画?但对于一部电影,你可以使用文本倒下 确定我有东西给你在这里检查了这一点,它保存在你的RES /阿尼姆文件夹中的.xml下降

<?xml version="1.0" encoding="utf-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android"> 
<translate 
    android:fromYDelta="-100%p" 
    android:toYDelta="0" 
    android:duration="2000" 
    /> 
</set> 

,并使用它,添加此代码在你的java文件

final Animation falling= AnimationUtils.loadAnimation(this, R.anim.falling); 
    textview.startAnimation(); 

修改值+已经在安卓fromYDelta获得流量。