I'm trying to rotate 3 imageViews
with a rotateAnimation
. I calculate the degrees to rotate every 30ms. If the angle changed, I create the rotateAnimation:
rpmAnim=new RotateAnimation((float)Rpmcurrentdegree, (float)Rpmdegree, ivNadel.getWidth()/2, ivNadel.getHeight()/2);
rpmAnim.setFillEnabled(true);
rpmAnim.setFillAfter(true);
...and then I start the animation of the imageView:
ivNadel.startAnimation(rpmAnim);
The rotation works fine, but when the degrees do not change, it jumps back to its starting position. Does anyone know why?