TouchImageView doesn't show animated gif

151 views Asked by At

I am using Glide to load animated gif images to ImageView:

Glide.with(this).load(gifUrl).into(imageView)

This works fine except when I use TouchImageView , the TouchImageView shows only a static image, no animation.

Any solution to this?

1

There are 1 answers

1
b1lly On
 Glide.with(this).asGif().load(gifUrl).into(new SimpleTarget<GifDrawable>() {
 @Override
       public void onResourceReady(GifDrawable resource, Transition<? super GifDrawable> transition) {
              resource.start();
              view.setImageDrawable(resource);
              view.setZoom(1f);
       }
});