Added in API level 23
Animatable2
interface Animatable2 : Animatable
android.graphics.drawable.Animatable2 |
Abstract class that drawables supporting animations and callbacks should extend.
Summary
Nested classes | |
---|---|
abstract |
Public methods | |
---|---|
abstract Unit |
Removes all existing animation callbacks. |
abstract Unit |
Adds a callback to listen to the animation events. |
abstract Boolean |
Removes the specified animation callback. |
Inherited functions | |
---|---|
Public methods
clearAnimationCallbacks
Added in API level 23
abstract fun clearAnimationCallbacks(): Unit
Removes all existing animation callbacks.
registerAnimationCallback
Added in API level 23
abstract fun registerAnimationCallback(callback: Animatable2.AnimationCallback): Unit
Adds a callback to listen to the animation events.
Parameters | |
---|---|
callback |
Animatable2.AnimationCallback: Callback to add. This value cannot be null . |
unregisterAnimationCallback
Added in API level 23
abstract fun unregisterAnimationCallback(callback: Animatable2.AnimationCallback): Boolean
Removes the specified animation callback.
Parameters | |
---|---|
callback |
Animatable2.AnimationCallback: Callback to remove. This value cannot be null . |
Return | |
---|---|
Boolean |
false if callback didn't exist in the call back list, or true if callback has been removed successfully. |