This is my animation in xml, I tried with android:pivotX="50%" but still I do not get what I want. The point of rotation is wrong. I want the green line to rotate around the middle of the screen.
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0" android:interpolator="@android:anim/linear_interpolator"
android:toDegrees="360" android:pivotX="0%" android:pivotY="0%"
android:repeatCount="5"
android:duration="5000" android:startOffset="0" />
I want to make animation like this:
the green line should rotate , and the rotation point should be the center of the screen. How can I do this ?