我希望能够创建一个类似机场航班时间表的文本动画,从顶部滑落并更改其上的文本。这是图片。因此,当我点击按钮时,图像上的文本应该以所述动画更改。在Android中是否可能实现?
请指导我如何在Android中实现这种类型的动画? 编辑:
如何在这些图片上放置垂直动画文本,使其看起来像我想要创建的动画?谢谢,AndroidVogue。
请指导我如何在Android中实现这种类型的动画? 编辑:
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<item android:drawable="@drawable/clockbg1" android:duration="150" />
<item android:drawable="@drawable/clockbg2" android:duration="150" />
<item android:drawable="@drawable/clockbg3" android:duration="150" />
<item android:drawable="@drawable/clockbg4" android:duration="150" />
<item android:drawable="@drawable/clockbg5" android:duration="150" />
<item android:drawable="@drawable/clockbg6" android:duration="150" />
</animation-list>
我的Activity类:
public class XMLAnimation extends Activity {
private static AnimationDrawable animation;
private ImageView refresh;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
refresh = (ImageView) findViewById(R.id.simple_anim);
refresh.setBackgroundResource(R.drawable.loader_animation);
animation = (AnimationDrawable) refresh.getBackground();
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
animation.start();
}
如何在这些图片上放置垂直动画文本,使其看起来像我想要创建的动画?谢谢,AndroidVogue。