diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java index 96f86b4..1ae10d3 100644 --- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java @@ -578,6 +578,15 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 { return mAnimatorSet.isStarted(); } + /** + * Resets the AnimatedVectorDrawable to the start state as specified in the animators. + */ + public void reset() { + // TODO: Use reverse or seek to implement reset, when AnimatorSet supports them. + start(); + mAnimatorSet.cancel(); + } + @Override public void start() { ensureAnimatorSet(); |