About pivots in tween animation for Android



I wrote XML code as follows.



<translate
android:duration="3000"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="100%"
android:toYDelta="0%" />


<rotate
android:duration="3000"
android:startOffset="3000"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="0%"
android:pivotY="0%"
/>


As you can see, this code moves a widget in X-Axis first, and then rotates it in 360 degrees.


The problem is, the pivot for the rotation stays in the starting position before translate animation.


The same thing happens with scale animation.


Is there any solution for this?


No comments:

Post a Comment