Android: start animation from state it ends -
so got rotation animation:
rotate = new rotateanimation(0f, -270f,200,200); rotate.setduration(2000); rotate.setfillafter(true);
and have button start animation on click
public void click(view view){ image.startanimation(rotate); }
and when click on button animation starts correctly , ends on needed state. when click second time begin state before animation.
question: how can start animation state ends?
object animator instead
objectanimator imageviewobjectanimator = objectanimator.offloat(imageview , "rotation", 0f, -270f); imageviewobjectanimator.setduration(2000); imageviewobjectanimator.start();
Comments
Post a Comment