Skip to content

Commit 941ff38

Browse files
Robert LyAndroid (Google) Code Review
authored andcommitted
Merge "fix bug 5942522" into ics-mr1
2 parents dcc910e + 9366ce8 commit 941ff38

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

graphics/java/android/graphics/drawable/AnimationDrawable.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ public boolean setVisible(boolean visible, boolean restart) {
102102

103103
/**
104104
* <p>Starts the animation, looping if necessary. This method has no effect
105-
* if the animation is running.</p>
105+
* if the animation is running. Do not call this in the {@link android.app.Activity#onCreate}
106+
* method of your activity, because the {@link android.graphics.drawable.AnimationDrawable} is
107+
* not yet fully attached to the window. If you want to play
108+
* the animation immediately, without requiring interaction, then you might want to call it
109+
* from the {@link android.app.Activity#onWindowFocusChanged} method in your activity,
110+
* which will get called when Android brings your window into focus.</p>
106111
*
107112
* @see #isRunning()
108113
* @see #stop()

0 commit comments

Comments
 (0)