Reputation: 2664
I need to load a Gif from the drwable folder in my image view. How can i show this in glide 4.11.0 version?
Also, note asGif method can't able to resolve.
Glide
.with(this)
.load(R.drawable.run).asGif()
.into(mGifImage);
Upvotes: 0
Views: 2242
Reputation: 2664
Worked using the below
Glide.with(itemView.getContext())
.asGif()
.load(thumbPath)
.placeholder(ResourcesCompat.getDrawable(context.getResources(),
R.drawable.image_loading_placeholder, null))
.centerCrop()
.into(new ImageViewTarget<GifDrawable>(imageView) {
@Override
protected void setResource(@Nullable GifDrawable resource) {
imageView.setImageDrawable(resource);
}
});
Upvotes: 1
Reputation: 56
Glide
.with(this)
.asGif()
.load(R.drawable.run).asGif()
.into(mGifImage);
if asGIF() didn't work then
use this library GIFPLAYER
Upvotes: 0