Home » Android » android – Animated splash screen using .gif

android – Animated splash screen using .gif

Posted by: admin June 15, 2020 Leave a comment


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" />

But when it runs, the gif image is not animating and only show the first frame.

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

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


How to&Answers:

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:


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


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:


I’m not sure if this meets your “other than customizing the Android Java code” requirement, though.