Animated splash screen using .gif

前端 未结 2 908
眼角桃花
眼角桃花 2020-12-31 18:24

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

...


        
相关标签:
2条回答
  • 2020-12-31 18:58

    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.

    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/

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

    0 讨论(0)
  • 2020-12-31 19:13

    You may be able to use a Movie instead of a WebView. That class is not well-documented but someone was nice enough to make a walkthrough, albeit one that isn't specific to splash screens:

    http://weavora.com/blog/2012/02/07/android-how-to-use-animated-gif/

    I'm not sure if this meets your "other than customizing the Android Java code" requirement, though.

    0 讨论(0)
提交回复
热议问题