Android的自定义动画像机场调度板自定义、画像、机场、Android

2023-09-13 00:31:30 作者:寂寞的烟斗

我想创建一个动画像机场的航班时刻表板做的文本。从上删除和更改文本就可以了。这里是图像。所以,当我点击按钮的图片上的文字应该改变与该动画。与Android是否有可能?

I want to create an animation for the text like on Airport the flight schedule board does. Dropping from top and change the text on it. Here is the image. So When I click on button the text on the image should change with the said animation. Does it possible with android?

请指引我,我怎样才能实现这种动画的机器人?

Please guide me how can I achieve this kind of animation in 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>

我的活动类:

My Activity Class:

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();
}

现在如何,所以它看起来像我想创造动画垂直放置动画文本这个图片?

Now How to place vertically animated text on this images so it looks like the animation I wanted to create?

谢谢, AndroidVogue

Thanks, AndroidVogue

推荐答案

我得到了工作库。最初由别人开发的,但我从升级Froyo 提供了支持版本。我希望这能帮助你。

I got working library. Originally developed by someone else but I provided support for down version from Froyo. I hope this can help you out.

AbhanFlipView

编号:

图书馆开发了:埃米尔Sjölander 动画创建人:杰克·沃顿

Library Developed By: Emil Sjölander Animations Created By: Jake Wharton

更新

它有一个名为文档 HowTo.txt 显示了如何整合。

It has a document named HowTo.txt shows how to integrate.

感谢。