AVD: Requires all animator has stopped before start again.

We should treat all the animator as a group, we should not start again unless
all the previous animations have stopped.

b/18320770

Change-Id: I5b0c2c165cd314745ee6c7152aea3c666e9dff10
This commit is contained in:
ztenghui
2014-11-07 11:49:45 -08:00
parent f4d2c8eebd
commit 1a40facbfd

View File

@@ -435,13 +435,16 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
@Override
public void start() {
// If any one of the animator has not ended, do nothing.
if (isStarted()) {
return;
}
// Otherwise, kick off every animator.
final ArrayList<Animator> animators = mAnimatedVectorState.mAnimators;
final int size = animators.size();
for (int i = 0; i < size; i++) {
final Animator animator = animators.get(i);
if (!animator.isStarted()) {
animator.start();
}
animator.start();
}
invalidateSelf();
}