4

I'm using Fresco library to show images full screen. How to show animated GIF images full screen using that library? Is there any other optimal solution?

Laura
  • 402
  • 1
  • 7
  • 24

1 Answers1

1

You have to add the dependency for Animated GIF decoding to your Gradle file:

implementation 'com.facebook.fresco:animated-gif:1.12.1'

Then, simply load the image into a SimpleDraweeView:

mSimpleDraweeView.setController(Fresco.newDraweeControllerBuilder()
        .setAutoPlayAnimations(true)
        .setOldController(simpleDraweeView.getController())
        .setUri(yourGifUrl)
        .build());
Alexander Oprisnik
  • 1,212
  • 9
  • 9