I\'ve created an animation for an ImageView based on a RotatedTranstion using the following code :
ImageView icon = ImageCache.getImage(\"refresh.png\");
Ro
The timing for acceleration and deceleration at each Transition
cycle is controlled by the Interpolator
. The default Interpolator
used by Transition is Interpolator.EASE_BOTH
.
You want linear interpolation so add this to your code:
rotateTransition.setInterpolator(Interpolator.LINEAR);
The apparent pause between each cycle is caused by the interpolator, which by default uses Interpolator.EASE_BOTH
(so it decelerates at the end of each cycle and accelerates at the beginning).
To remove this, just set the interpolator to Interpolator.LINEAR
:
rotateTransition.setInterpolator(Interpolator.LINEAR);