2

I am using this code

    <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true">
    <rotate 
        android:radius="10dp"
        android:duration="300"
        android:fromYDelta="0%p"
        android:fromXDelta="0%p"
        android:fromDegrees="0.0" 
        android:toDegrees="360.0"
        android:interpolator="@android:anim/linear_interpolator"
        android:scaleX="-1"
        android:pivotX="50%" 
        android:pivotY="50%" />

</set>

It is rotating the imageView in x-axis but i want to rotate the imageview in z-axis how can i do it

Sumit Marwha
  • 303
  • 5
  • 15
  • I think with RotateDrawable (https://developer.android.com/reference/android/graphics/drawable/RotateDrawable.html) is not the best way, because a Drawable is in two dimensions, the API does not allow it. You can apply transformation with image processing algorithms for your expected result. – fechidal89 Aug 25 '16 at 14:11

1 Answers1

1

You can see this answer: animation to transition between views with rotation on z-axis with depth perception

With RotateDrawable, It not possible.

Community
  • 1
  • 1
fechidal89
  • 723
  • 5
  • 25