Plotting and rotation in the center of view do not work together in API 16

enter image description hereWe tried to rotate the image using centralized scaling. We set centercrop to add parallax effect to the image as we scroll. It works on latest android sdk. But we have a problem in API 16 devices. When we spin the imagination, it fills up to show the whole image. How can we solve this problem?

We tried to replace the custom image image with the Android view. The same thing happens.

Here is our xml code.

<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>

      

enter image description here

+3


source to share





All Articles