我目前正在开发一个抽屉导航,我希望用户照片在这里被缩放、裁剪、着色,然后用作图片圆形裁剪后面的标题图像。
我什至无法发布图片,因为这个帐户的知名度太低了...该死的我用我以前的学生帐户来解决我的大部分问题...
尽管我的 ImageView
是这样定义的
<ImageView
android:tint="@color/clyp_copy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/pixplogo"
android:scaleType="centerCrop"
android:adjustViewBounds="true"/>
This image (1) skews like this (2) (Same link, two images)
这对我来说实际上是一个普遍的问题。我从未让 centerCrop
正常工作。我不明白为什么。
在 5.1.1 上测试,基于 SDK 23 构建。21 日同样的问题
Not sure if this is allowed on SO, but here's a Debug apk...maybe it's just my device...or 5.x
最佳答案
替换
android:background="@drawable/pixplogo"
与
android:src="@drawable/pixplogo"
关于Android ImageView centerCrop 不工作。倾斜而不是缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32813840/