Android - AnimatorSet, Object Animator - Bounce animation chain is amalgamating?
When you use the Builder, all returning dependencies refer to the first Animator, so you had 3 bounces happening simultaneously after the first movement. Unfortunately it seems AnimatorSet is broken on some aspects, one of them being repeats : https://code.google.com/p/android/issues/detail?id=17662
OK so I eventually found a fairly neat way to achieve sequential animation by ignoring the fluent builder, and just using the playSequentially()
method such that:
AnimatorSet as = new AnimatorSet();
as.playSequentially(ObjectAnimator.ofFloat(...), // anim 1
ObjectAnimator.ofFloat(...), // anim 2
ObjectAnimator.ofFloat(...), // anim 3
ObjectAnimator.ofFloat(...)); // anim 4
as.setDuration(600);
as.start();
Still haven't worked out repeating though, other than a dirty hack involving the callback onAnimationEnd in a listener. Must be a simpler way, so perhaps someone can edit this when they know of one.
Anyway, hope the above helps someone.