Animatable2Compat
interface Animatable2Compat : Animatable
androidx.vectordrawable.graphics.drawable.Animatable2Compat |
Interface that drawables supporting animations and callbacks should extend in support lib.
Summary
Nested classes |
|
---|---|
abstract |
Abstract class for animation callback. |
Public methods |
|
---|---|
abstract Unit |
Removes all existing animation callbacks. |
abstract Unit |
registerAnimationCallback(@NonNull callback: Animatable2Compat.AnimationCallback) Adds a callback to listen to the animation events. |
abstract Boolean |
unregisterAnimationCallback(@NonNull callback: Animatable2Compat.AnimationCallback) Removes the specified animation callback. |
Public methods
clearAnimationCallbacks
abstract fun clearAnimationCallbacks(): Unit
Removes all existing animation callbacks.
registerAnimationCallback
abstract fun registerAnimationCallback(@NonNull callback: Animatable2Compat.AnimationCallback): Unit
Adds a callback to listen to the animation events.
Parameters | |
---|---|
callback |
Animatable2Compat.AnimationCallback: Callback to add. |
unregisterAnimationCallback
abstract fun unregisterAnimationCallback(@NonNull callback: Animatable2Compat.AnimationCallback): Boolean
Removes the specified animation callback.
Parameters | |
---|---|
callback |
Animatable2Compat.AnimationCallback: Callback to remove. |
Return | |
---|---|
Boolean: false if callback didn't exist in the call back list, or true if callback has been removed successfully. |