【发布时间】:2016-03-05 12:03:43
【问题描述】:
我关心的是如何使用 Glide 将使用 android:scaleType="fitXY" 的图像拟合到图像中。
我的ImageView 是
<ImageView
android:id="@+id/img_pager"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:scaleType="fitXY" />
像这样使用 Glide 加载图像
Glide.with(context).load(url).placeholder(R.drawable.default_image).into(img);
但图像不适合ImageView 它在图像两侧显示空间,如屏幕所示我需要它fitXY
【问题讨论】:
标签: android image android-layout crop android-glide