【发布时间】:2016-05-09 12:04:32
【问题描述】:
我正在使用 Glide 库在 imageview 中加载图像并使用以下代码。
Glide.with(mActivity)
.load(img.getmGridViewImageUrl())
.placeholder(R.color.grey_light)
.into(imageHolder.imageView);
灰色占位符在图像未加载之前可见,但在图像在 imageview 中加载后,占位符仍会出现并在该图像之后显示一些空白区域。
我该如何解决这个问题。如果您有任何想法,请帮助我。
【问题讨论】:
-
你确定你没有在 xml 中为 imageview 设置背景
-
不,我没有使用 xm 文件中图像视图的任何背景。
<ImageView android:id="@+id/thumbnail" android:layout_width="match_parent" android:adjustViewBounds="true" android:scaleType="fitCenter" android:layout_height="wrap_content" />这是我用于 imageView 的。 -
尝试删除 scaleType 或 adjustViewBounds ,你确定你需要这 2 个属性
标签: android imageview android-glide