Example usage for Java android.graphics.drawable AnimationDrawable fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addFrame(@NonNull Drawable frame, int duration) Adds a frame to the animation |
int | getDuration(int i) |
Drawable | getFrame(int index) |
int | getNumberOfFrames() |
boolean | isOneShot() |
boolean | isRunning() Indicates whether the animation is currently running or not. |
boolean | selectDrawable(int index) Sets the currently displayed drawable by index. |
void | setAlpha(int alpha) |
void | setCallback(@Nullable Callback cb) Bind a Callback object to this Drawable. |
void | setColorFilter(@ColorInt int color, @NonNull PorterDuff.Mode mode) Specify a color and Porter-Duff mode to be the color filter for this drawable. |
boolean | setLevel(@IntRange(from = 0, to = 10000) int level) Specify the level for the drawable. |
void | setOneShot(boolean oneShot) Sets whether the animation should play once or repeat. |
boolean | setVisible(boolean visible, boolean restart) Sets whether this AnimationDrawable is visible. |
void | start() Starts the animation from the first frame, looping if necessary. |
void | stop() Stops the animation at the current frame. |