Android Animation - Rotate Image Moves Irregularly -
when start animation moves slow in beginning , gets faster move. suggest me. here code
animation rotateanim; rotateanim = new rotateanimation(0, 360, animation.relative_to_self, 0.5f, animation.relative_to_self, 0.5f); rotateanim.setduration(60*1000); rotateanim.setinterpolator(new accelerateinterpolator()); _mclockneedle.startanimation(rotateanim);
you using accelerateinterpolator
. behavior describe how class made, specified in api. may want use linearinterpolator
instead, if want move @ constant rate. there other subclasses of interpolator
chose from.
if wish animation shorter or longer done setduration
method, in milliseconds, you've set 1 minute in example.
Comments
Post a Comment