interface Animatable2Compat : 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 functions

Unit

Removes all existing animation callbacks.

Unit

Adds a callback to listen to the animation events.

Boolean

Removes the specified animation callback.

Public functions

clearAnimationCallbacks

Added in 1.0.0
fun clearAnimationCallbacks(): Unit

Removes all existing animation callbacks.

registerAnimationCallback

Added in 1.0.0
fun registerAnimationCallback(
    callback: Animatable2Compat.AnimationCallback
): Unit

Adds a callback to listen to the animation events.

Parameters
callback: Animatable2Compat.AnimationCallback

Callback to add.

unregisterAnimationCallback

Added in 1.0.0
fun unregisterAnimationCallback(
    callback: Animatable2Compat.AnimationCallback
): Boolean

Removes the specified animation callback.

Parameters
callback: Animatable2Compat.AnimationCallback

Callback to remove.

Returns
Boolean

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