【发布时间】:2017-02-20 09:57:24
【问题描述】:
我有 imageview,它应该只显示图像的一部分(适合屏幕的一部分)。用户单击后,它将打开整个图像。但我不知道如何仅将部分图像加载到 imageview 中。问题是 Glide 总是将图像放入 imageview 中。
Glide.with(context)
.using(new FirebaseImageLoader())
.load(storageReference)
.into(imageView);
现在的样子。红色部分为 ImageView。
我多么希望拥有它。
编辑
以下代码会适合,但它会显示整个图像,仅显示其中的一部分,并且会破坏比例。
android:scaleType="fitXY"
android:adjustViewBounds="true"
【问题讨论】:
-
在更新为imageView之前可以使用simpletarget处理图片
-
我更新了答案
标签: android firebase imageview android-glide