使用.gif注意:动画闪屏

问题描述:

我想用动画的 GIF 作为启动画面。所以我改变了的src config.xml中为我的GIF是这样的:

I want to use animated gif for the Splash screen. So I change the src in config.xml into my gif like this:

...
<gap:splash gap:density="xhdpi" gap:platform="android" src="res/screen/android/screen-xhdpi-portrait.gif" />
...

但它运行时,GIF图像的不是动画并只显示第一帧。

我的应用程序内的另一个GIF,它动画好。所以我想一个在开机画面是不是的WebView

I have another gif inside the app and it animates well. So I guess the one in splash screen is not WebView?

有没有办法使用GIF比定制的Andr​​oid的Java code等闪屏?

Is there a way to use gif for splash screen other than customizing the Android Java code?

感谢

在web视图.gif注意效果很好。在其他情况下,它不能在Android的工作。你需要定制的Andr​​oid的Java code,使其工作。但他们是一个另类。

In webview .gif works well. In other cases it does not work in android. You need to customize android java code to make it work. But their is an alternative.

如果你对所有的帧图像(你也可以从GIF提取它们),并采用Android动画上的图像。它看起来像只GIF图像。所有我的意思是,你可以做框架anmations。

If you have the images for all frames (you may also extract them from gif) and use android animation on the images. It will look like gif image only. All i mean is that you can do frame anmations.

这个链接会给你一些想法:

This link will give you some idea:

http://mobile.tutsplus.com/tutorials/android/android-sdk-quick-tip-creating-frame-animations/

您可以用google更找到更好的教程。这种动画效果非常好。

You may google more to find better tutorial. This kind animation works very well.