public interface

AnimationListener

com.facebook.fresco.animation.drawable.AnimationListener
Known Indirect Subclasses

Class Overview

Animation listener that can be used to get notified about AnimatedDrawable2 events. Call setAnimationListener(AnimationListener) to set a listener.

Summary

Public Methods
abstract void onAnimationFrame(AnimatedDrawable2 drawable, int frameNumber)
Called when a frame of the animation is about to be rendered.
abstract void onAnimationRepeat(AnimatedDrawable2 drawable)
Called when the animation is repeated for the given drawable.
abstract void onAnimationReset(AnimatedDrawable2 drawable)
Called when the animation is reset for the given drawable.
abstract void onAnimationStart(AnimatedDrawable2 drawable)
Called when the animation is started for the given drawable.
abstract void onAnimationStop(AnimatedDrawable2 drawable)
Called when the animation is stopped for the given drawable.

Public Methods

public abstract void onAnimationFrame (AnimatedDrawable2 drawable, int frameNumber)

Called when a frame of the animation is about to be rendered.

Parameters
drawable the affected drawable
frameNumber the frame number to be rendered

public abstract void onAnimationRepeat (AnimatedDrawable2 drawable)

Called when the animation is repeated for the given drawable. Animations have a loop count, and frame count, so this is called when the frame count is 0 and the loop count is increased.

Parameters
drawable the affected drawable

public abstract void onAnimationReset (AnimatedDrawable2 drawable)

Called when the animation is reset for the given drawable.

Parameters
drawable the affected drawable

public abstract void onAnimationStart (AnimatedDrawable2 drawable)

Called when the animation is started for the given drawable.

Parameters
drawable the affected drawable

public abstract void onAnimationStop (AnimatedDrawable2 drawable)

Called when the animation is stopped for the given drawable.

Parameters
drawable the affected drawable