summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Ly <robertly@google.com> 2012-03-01 14:10:46 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2012-03-01 14:10:46 -0800
commitd70eaff41ce4e033656eeebb5eb7153b49d2ac5a (patch)
tree136bd9c944e770fac90811b844a886cd59fa7a21
parent8125b0b4343b7f480196ce73103ca00cdf64f9e5 (diff)
parent941ff38d05f1d870df224ac329d16ab2207b94a1 (diff)
am 941ff38d: Merge "fix bug 5942522" into ics-mr1
* commit '941ff38d05f1d870df224ac329d16ab2207b94a1': fix bug 5942522
-rw-r--r--graphics/java/android/graphics/drawable/AnimationDrawable.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimationDrawable.java b/graphics/java/android/graphics/drawable/AnimationDrawable.java
index 07de074d48a2..35343be8b535 100644
--- a/graphics/java/android/graphics/drawable/AnimationDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimationDrawable.java
@@ -102,7 +102,12 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
/**
* <p>Starts the animation, looping if necessary. This method has no effect
- * if the animation is running.</p>
+ * if the animation is running. Do not call this in the {@link android.app.Activity#onCreate}
+ * method of your activity, because the {@link android.graphics.drawable.AnimationDrawable} is
+ * not yet fully attached to the window. If you want to play
+ * the animation immediately, without requiring interaction, then you might want to call it
+ * from the {@link android.app.Activity#onWindowFocusChanged} method in your activity,
+ * which will get called when Android brings your window into focus.</p>
*
* @see #isRunning()
* @see #stop()