summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2015-06-05 15:22:24 -0700
committerztenghui <ztenghui@google.com>2015-06-05 15:42:59 -0700
commit96052718067e1645afd7c7ae93bab536711349ac (patch)
tree0b523ce05a622fd8b78d72b33777f4c694059701 /graphics
parent8fa24e91c4dbe8a6533e99eeea4d8b200437d92a (diff)
downloadframeworks_base-96052718067e1645afd7c7ae93bab536711349ac.zip
frameworks_base-96052718067e1645afd7c7ae93bab536711349ac.tar.gz
frameworks_base-96052718067e1645afd7c7ae93bab536711349ac.tar.bz2
Add reset to AVD
b/21664621 Change-Id: Ie40c3723860e183c8e4fedd2a76b9debbdf64a2a
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java9
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();