AIMIN PAN
AIMIN PAN

Reputation: 1675

TouchImageView doesn't show animated gif

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?

Upvotes: -2

Views: 154

Answers (1)

b1lly
b1lly

Reputation: 123

 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);
       }
});

Upvotes: 0

Related Questions