Problem with Animated gif on Android

匆匆过客 提交于 2019-11-29 14:47:11

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

Nikhil Borad

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

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()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!