public interface Animatable2Compat extends Animatable

Known direct subclasses
AnimatedVectorDrawableCompat

For API 24 and above, this class is delegating to the framework's .


Interface that drawables supporting animations and callbacks should extend in support lib.

Summary

Nested types

Abstract class for animation callback.

Public methods

abstract void

Removes all existing animation callbacks.

abstract void

Adds a callback to listen to the animation events.

abstract boolean

Removes the specified animation callback.

Inherited methods

From android.graphics.drawable.Animatable
abstract boolean
abstract void
abstract void

Public methods

clearAnimationCallbacks

Added in 1.0.0
abstract void clearAnimationCallbacks()

Removes all existing animation callbacks.

registerAnimationCallback

Added in 1.0.0
abstract void registerAnimationCallback(
    @NonNull Animatable2Compat.AnimationCallback callback
)

Adds a callback to listen to the animation events.

Parameters
@NonNull Animatable2Compat.AnimationCallback callback

Callback to add.

unregisterAnimationCallback

Added in 1.0.0
abstract boolean unregisterAnimationCallback(
    @NonNull Animatable2Compat.AnimationCallback callback
)

Removes the specified animation callback.

Parameters
@NonNull Animatable2Compat.AnimationCallback callback

Callback to remove.

Returns
boolean

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