From 8901ffab294934fc4899143f31bd58f3d58df225 Mon Sep 17 00:00:00 2001 From: Patrick Dubroy Date: Sun, 16 Jan 2011 17:13:55 -0800 Subject: Add a method for clearing all animations on a thread. --- core/java/android/animation/ValueAnimator.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/java/android/animation') diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index 1590bf4..5705057 100755 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -1192,4 +1192,16 @@ public class ValueAnimator extends Animator { public static int getCurrentAnimationsCount() { return sAnimations.get().size(); } + + /** + * Clear all animations on this thread, without canceling or ending them. + * This should be used with caution. + * + * @hide + */ + public static void clearAllAnimations() { + sAnimations.get().clear(); + sPendingAnimations.get().clear(); + sDelayedAnims.get().clear(); + } } -- cgit v1.1