无法使用滑行加载图像

时间:2020-05-17 15:39:31

标签: java android api imageview android-glide

在我的应用程序中,我试图从Google Play图书API中获取一本书的缩略图,并在图像视图中显示它,但是以某种方式我无法正常工作。

Glide.with(holder.thumb.getContext())
                    .load(curThumb)
                    .into(holder.thumb);

当我将上述方法与本地图像配合使用时,缩略图网址也正确

1 个答案:

答案 0 :(得分:0)

我尝试使用Glide v4.0.0-RC1使用RequestOptions添加占位符,错误图像和其他选项,以确保URL(image_url)以https而不是HTTP开头

li[id$=\"4\' 3\"]

RequestOptions,用于添加占位符,错误图片和自定义图片

   RequestOptions options = new RequestOptions()
                        .centerCrop()
                        .placeholder(R.mipmap.ic_launcher_round)
                        .error(R.drawable.your_error_image);