Hi I'm trying to do a series of animations but it's failing miserably. It worked fine when it was just 4.0 but I added support for 2.2 and 2.3 using nineoldandroid. it seamed to work but the AnimatorListener
's method onAnimationEnd
is called twice.
This is the code I'm using for the animation:
animate(horizontalView)
.translationX(xDelta)
.setDuration(2000)
.setListener(new Animator.AnimatorListener() {
//listener implementation onAnimationEnd
@Override
public void onAnimationEnd(Animator animator) {
animate(droppingView)
.translationY(yDelta)
.setDuration(2000)
.setListener(null)
.start();
}
}).start();
The first animation fires its listener twice and the second animation 3 times. This only happens on 2.2 and 2.3 from what I've tested.