Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Imageview android旋转和中心裁剪在API 16中不起作用_Android - Fatal编程技术网

Imageview android旋转和中心裁剪在API 16中不起作用

Imageview android旋转和中心裁剪在API 16中不起作用,android,Android,我们尝试使用scaletype centercrop旋转imageview。我们正在设置centercrop,以便在滚动时为图像添加视差效果。它在最新的android sdk版本中运行良好。但我们在API 16设备中遇到了问题。当我们旋转imagview时,它将填充以显示整个图像。 我们如何解决这个问题 我们尝试用android图像视图替换自定义图像视图。同样的问题也会发生 这是我们的xml代码 <FrameLayout android:id="@+id/home_item"

我们尝试使用scaletype centercrop旋转imageview。我们正在设置centercrop,以便在滚动时为图像添加视差效果。它在最新的android sdk版本中运行良好。但我们在API 16设备中遇到了问题。当我们旋转imagview时,它将填充以显示整个图像。 我们如何解决这个问题

我们尝试用android图像视图替换自定义图像视图。同样的问题也会发生

这是我们的xml代码

<FrameLayout
    android:id="@+id/home_item"
    android:layout_width="match_parent"
    android:clipChildren="false"
    android:rotation="-10"
    android:transformPivotX="600dp"
    android:layout_height="wrap_content">

        <com.fmsirvent.ParallaxEverywhere.PEWImageView
            android:id="@+id/home_item_image"
            android:layout_width="match_parent"
            android:layout_height="320dp"
            android:layout_gravity="center"
            android:scaleType="centerCrop"
            android:src="@drawable/menu_workouts"
            pew:reverse="reverseY"
            pew:parallax_x="220dp"
            pew:parallax_y="220dp"/>

    <TextView
        android:id="@+id/home_item_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/white_color"
        android:textSize="25sp"
        android:translationX="@dimen/translation_x_for_menu_text"
        android:text="WORKOUTS"
        android:background="#000000"
        android:layout_gravity="bottom|right"
        android:paddingLeft="8dp"
        android:paddingRight="25dp"
        android:paddingTop="5dp" />

</FrameLayout>


问题解决了吗?我也有同样的问题!你解决问题了吗?