Rotation of image using ViewAnimation or PropertyAnimation in android
<p>I want to rotate an image in my application in such a manner that it rotate like a simple pendulam and will stop after some time.</p>

<p>How I can achieve it using View Animation or Property Animation in android</p>

<p>I used the below xml for the animation</p>

<pre><code>     &lt;rotate
        android:duration="2000"
        android:interpolator="@android:anim/accelerate_decelerate_interpolator"
        android:fromDegrees="-15"
        android:pivotX="50%"
        android:pivotY="0%"
        android:repeatCount="5"
        android:repeatMode="reverse"
        android:toDegrees="15" /&gt;
</code></pre>

<p>And below is the code for the animation</p>

<pre><code>    Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(this,
            R.anim.rotate);
    firstBell.startAnimation(hyperspaceJumpAnimation);
</code></pre>

<p>But  the problem is when animation starts it suddenly move to angle -15 and then start animating. And it stops after 5 count suddenly not in smooth way.</p>

<p>So my question is how to resolve this issue</p>

<p>Looking for help.</p>
