我需要从我的图像视图中的drwable文件夹中加载一个Gif。如何在glide 4.11.0版本中显示此功能?
另外,请注意asGif方法无法解析。
Glide
.with(this)
.load(R.drawable.run).asGif()
.into(mGifImage);
发布于 2020-12-17 15:28:12
Glide
.with(this)
.asGif()
.load(R.drawable.run).asGif()
.into(mGifImage);
如果asGIF()不工作,那么
使用此库GIFPLAYER
发布于 2020-12-17 15:42:57
使用下面的代码
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);
}
});
https://stackoverflow.com/questions/65335297
复制相似问题