Playing an animated GIF image file in imageview

后端 未结 3 2139
既然无缘
既然无缘 2021-02-15 15:51

I am making an Android application, in which I want to play a GIF file in an imageview. I have a tried a lot of ways, made a custom class but haven\'t succeeded.

Has an

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 16:37

    Natively ImageView does not support animated image. You can use two options to show animated gif file

    1. Use VideoView
    2. Use ImageView

    But split the gif file into several parts and then apply animation to it. Try this link-playing-gif-animation you will get the desired result.

提交回复
热议问题