lightbulb_outline Please take our October 2018 developer survey. Start survey

Animatable2

public interface Animatable2
implements Animatable

android.graphics.drawable.Animatable2


Abstract class that drawables supporting animations and callbacks should extend.

Summary

Nested classes

class Animatable2.AnimationCallback

 

Public methods

abstract void clearAnimationCallbacks()

Removes all existing animation callbacks.

abstract void registerAnimationCallback(Animatable2.AnimationCallback callback)

Adds a callback to listen to the animation events.

abstract boolean unregisterAnimationCallback(Animatable2.AnimationCallback callback)

Removes the specified animation callback.

Inherited methods

Public methods

clearAnimationCallbacks

added in API level 23
public abstract void clearAnimationCallbacks ()

Removes all existing animation callbacks.

registerAnimationCallback

added in API level 23
public abstract void registerAnimationCallback (Animatable2.AnimationCallback callback)

Adds a callback to listen to the animation events.

Parameters
callback Animatable2.AnimationCallback: Callback to add.

This value must never be null.

unregisterAnimationCallback

added in API level 23
public abstract boolean unregisterAnimationCallback (Animatable2.AnimationCallback callback)

Removes the specified animation callback.

Parameters
callback Animatable2.AnimationCallback: Callback to remove.

This value must never be null.

Returns
boolean false if callback didn't exist in the call back list, or true if callback has been removed successfully.