Android ImageView centerCrop无法正常工作。歪斜而不是缩放

时间:2015-09-27 23:20:37

标签: android imageview scale crop

我目前正在制作一个导航抽屉,我希望用户照片可以缩放,裁剪,着色,然后用作那张照片的圆形裁剪背后的标题图片。

我甚至无法发布图片,因为这个帐户代表太低了...该死我,并且在我的大多数问题中使用我的旧学生帐户...

尽管我的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上的相同问题

Not sure if this is allowed on SO, but here's a Debug apk...maybe it's just my device...or 5.x

1 个答案:

答案 0 :(得分:23)

替换

android:background="@drawable/pixplogo"

android:src="@drawable/pixplogo"