I'm using the following code to make turns (left or right) in a series. So if i call it one after another ie: turn(90); turn(90); turn(-90);
all it shows is the last one. I'd like to show them all and it wait until the first one is done before moving on to the next. Any idea's?
public void turn(int i)
{
RotateAnimation anim = new RotateAnimation( currentRotation, currentRotation + i,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f);
currentRotation = (currentRotation + i) % 360;
anim.setInterpolator(new LinearInterpolator());
anim.setDuration(1000);
anim.setFillEnabled(true);
anim.setFillAfter(true);
token.startAnimation(anim);
}