Skip to content Skip to sidebar Skip to footer

Problem With Animated Gif On Android

I need some advice about animation. I have an animated GIF, but how to put in Android app to be animation. When I put it doesn't move at all. I read something about animation in An

Solution 1:

Android does not support animated GIFs much. You can use an AnimationDrawable, perhaps defined from frames using a drawable XML file.

Solution 2:

you can do it by using GIF image in your app as Splash screen. Android does not support animated GIFs. so extract gif to png pictures with gif2png and it works with XML. And Other Option Adding gif image in an ImageView in android Adding gif image in an ImageView in android

Solution 3:

100 % Work...

1) Add Glide library dependency...

compile'com.github.bumptech.glide:glide:4.2.0'

2)

imageView = findViewById(R.id.gifImage);

3)

 Glide.with(getApplicationContext())
            .asGif()
            .load(R.drawable.gifImage)
            .into(imageView);

just use .asGif() before .load()

Post a Comment for "Problem With Animated Gif On Android"