Android: Show and pause GIFs

I know that many people have already asked how to display GIFs in Android, but most answers have most problems:

  • They use libraries that are now out of date.
  • They use libraries that do not allow you to pause (and resume) the animation, which I would like to do.

What is the easiest way to do this at the moment?

+4
source share
1 answer

The application has a good library for displaying GIF images. android-gif-drawable

It uses both XML and Java very well. It also provides you with a very easy to use API.

, , , :

GifDrawable Animatable MediaPlayerControl, :

  • stop() - ,
  • start() - ,
  • isRunning() -
  • reset() - , .
  • setSpeed(float factor) - , . 2.0f
  • seekTo(int position) - ( ) ( )
  • getDuration() -
  • getCurrentPosition() -
0

Source: https://habr.com/ru/post/1615306/


All Articles