2

I have an animated GIF I created and I want to put it on the splash screen.
There are way to show bitmap

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">

<item android:drawable="@android:color/white"/>

<item>

    <bitmap
        android:src="@drawable/fiadr"
        android:gravity="center"/>

</item>


</layer-list>

But I found no way to use animated GIFs.
How do I achieve this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Aksh
  • 321
  • 2
  • 16

1 Answers1

3

You have 2 options,

1) Use Glide to display that GIF Glide.with(this).load(R.raw.image_gif).asGif().into(imageView);

https://bumptech.github.io/glide/

Show GIF file with Glide (image loading and caching library)

2) Convert your animation to be in Adobe After Affects and use Lottie to show it. Instructions

I recommend option #2 if you are able to convert your animation to After Affects. Lottie will be soother and look better for your users than a GIF.

Shmuel
  • 3,916
  • 2
  • 27
  • 45
  • Oh...I used photoshop tho...I don't think there's a way to switch between the two. Is there? – Aksh Sep 12 '18 at 15:40
  • That doesn't really work...The app takes time to load...which means it's would be like playing a gif after blank splash screen – Aksh Sep 12 '18 at 19:13