Android定制动画,如机场时间表板

7 customization animation android uiviewanimation

我想为航班时刻表上的机场创建动画.从顶部删除并更改其上的文本.这是图像.所以当我点击按钮时,图像上的文字应该随着所述动画而改变.Android有可能吗?

在此输入图像描述

请指导我如何在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>
Run Code Online (Sandbox Code Playgroud)

我的活动班:

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();
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 在此输入图像描述 在此输入图像描述 在此输入图像描述 在此输入图像描述 在此输入图像描述

现在如何在这些图像上放置垂直动画文本,使它看起来像我想要创建的动画?

谢谢,AndroidVogue

小智 0

我有工作图书馆。最初是由其他人开发的,但我提供了对Froyo. 我希望这可以帮助你。

\n\n

AbhanFlipView

\n\n

参考:

\n\n

库开发者:Emil Sj\xc3\xb6lander \n动画创建者:Jake Wharton

\n\n

更新

\n\n

它有一个名为HowTo.txt shows how to Integration”的文档。

\n\n

谢谢。

\n