Java android.graphics.drawable AnimationDrawable fields, constructors, methods, implement or subclass

Example usage for Java android.graphics.drawable AnimationDrawable fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics.drawable AnimationDrawable.

The text is from its open source code.

Constructor

Method

voidaddFrame(@NonNull Drawable frame, int duration)
Adds a frame to the animation
intgetDuration(int i)
DrawablegetFrame(int index)
intgetNumberOfFrames()
booleanisOneShot()
booleanisRunning()
Indicates whether the animation is currently running or not.
booleanselectDrawable(int index)
Sets the currently displayed drawable by index.
voidsetAlpha(int alpha)
voidsetCallback(@Nullable Callback cb)
Bind a Callback object to this Drawable.
voidsetColorFilter(@ColorInt int color, @NonNull PorterDuff.Mode mode)
Specify a color and Porter-Duff mode to be the color filter for this drawable.
booleansetLevel(@IntRange(from = 0, to = 10000) int level)
Specify the level for the drawable.
voidsetOneShot(boolean oneShot)
Sets whether the animation should play once or repeat.
booleansetVisible(boolean visible, boolean restart)
Sets whether this AnimationDrawable is visible.
voidstart()
Starts the animation from the first frame, looping if necessary.
voidstop()
Stops the animation at the current frame.