更新时间:2023-02-13 22:58:40
我找到了 Glide 的解决方案. 您可以指定要作为缩略图加载的低分辨率图像.您只需要:
I found solution with Glide. You can specify low resolution image to be loaded as thumbnail. All you need is:
private void loadImageThumbnailRequest() {
// setup Glide request without the into() method
DrawableRequestBuilder<String> thumbnailRequest = Glide
.with( context )
.load( yourData.getLowQualityLink() );
// pass the request as a a parameter to the thumbnail request
Glide
.with( context )
.load( yourData.getHdUrl() )
.thumbnail( thumbnailRequest )
.into( imageView );
}
在来源此处