【发布时间】:2016-05-04 19:22:57
【问题描述】:
有我的ImageView
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="150dp" />
我使用Picasso 库将图像加载到这个ImageView。
Picasso.with(getActivity()).load(url)
.config(Bitmap.Config.RGB_565)
.into(imageView);
ImageView 内部有填充和加载的图像存在问题。
我使用.fit() 方法来避免这种差距,但图像拉伸和质量损失。
问题是:
我应该怎么做才能避免失去图像质量并将其直接调整为ImageView。我无法添加.centerCrop(),因为图像的左侧是逻辑安全区。我也不能更改layout_height="150dp",因为它会破坏我所有的布局。
还是谢谢你!
【问题讨论】:
-
然后使用质量更好的图片