GifDrawable

open class GifDrawable : GifFrameLoader.FrameCallback

An animated android.graphics.drawable.Drawable that plays the frames of an animated GIF.

Constructors

Link copied to clipboard
open fun GifDrawable(    context: Context,     gifDecoder: GifDecoder,     bitmapPool: BitmapPool,     frameTransformation: Transformation<Bitmap>,     targetFrameWidth: Int,     targetFrameHeight: Int,     firstFrame: Bitmap)
Constructor for GifDrawable.
Link copied to clipboard
open fun GifDrawable(    context: Context,     gifDecoder: GifDecoder,     frameTransformation: Transformation<Bitmap>,     targetFrameWidth: Int,     targetFrameHeight: Int,     firstFrame: Bitmap)
Constructor for GifDrawable.

Functions

Link copied to clipboard
open fun clearAnimationCallbacks()
Link copied to clipboard
open fun draw(canvas: Canvas)
Link copied to clipboard
open fun getBuffer(): ByteBuffer
Link copied to clipboard
open fun getConstantState(): ConstantState
Link copied to clipboard
open fun getFirstFrame(): Bitmap
Link copied to clipboard
open fun getFrameCount(): Int
Link copied to clipboard
open fun getFrameIndex(): Int
Returns the current frame index in the range 0..
Link copied to clipboard
open fun getFrameTransformation(): Transformation<Bitmap>
Link copied to clipboard
open fun getIntrinsicHeight(): Int
Link copied to clipboard
open fun getIntrinsicWidth(): Int
Link copied to clipboard
open fun getOpacity(): Int
Link copied to clipboard
open fun getSize(): Int
Link copied to clipboard
open fun onFrameReady()
Link copied to clipboard
open fun recycle()
Clears any resources for loading frames that are currently held on to by this object.
Link copied to clipboard
open fun registerAnimationCallback(animationCallback: AnimationCallback)
Register callback to listen to GifDrawable animation end event after specific loop count set by setLoopCount.
Link copied to clipboard
open fun setAlpha(i: Int)
Link copied to clipboard
open fun setColorFilter(colorFilter: ColorFilter)
Link copied to clipboard
open fun setFrameTransformation(frameTransformation: Transformation<Bitmap>, firstFrame: Bitmap)
Link copied to clipboard
open fun setLoopCount(loopCount: Int)
Link copied to clipboard
open fun setVisible(visible: Boolean, restart: Boolean): Boolean
Link copied to clipboard
open fun start()
Link copied to clipboard
open fun startFromFirstFrame()
Starts the animation from the first frame.
Link copied to clipboard
open fun stop()
Link copied to clipboard
open fun unregisterAnimationCallback(animationCallback: AnimationCallback): Boolean

Properties

Link copied to clipboard
open val isRunning: Boolean
True if the drawable is currently animating.
Link copied to clipboard
val LOOP_FOREVER: Int
A constant indicating that an animated drawable should loop continuously.
Link copied to clipboard
val LOOP_INTRINSIC: Int
A constant indicating that an animated drawable should loop for its default number of times.