Stay organized with collections
Save and categorize content based on your preferences.
AnimationCallback
abstract class AnimationCallback
Summary
Public methods |
open Unit |
Called when the animation ends.
|
open Unit |
Called when the animation starts.
|
Public constructors
AnimationCallback
AnimationCallback()
Public methods
onAnimationEnd
open fun onAnimationEnd(drawable: Drawable!): Unit
Called when the animation ends.
Parameters |
drawable |
Drawable!: The drawable finished the animation. |
onAnimationStart
open fun onAnimationStart(drawable: Drawable!): Unit
Called when the animation starts.
Parameters |
drawable |
Drawable!: The drawable started the animation. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Animatable2.AnimationCallback\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAnimationCallback\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/drawable/Animatable2.AnimationCallback \"View this page in Java\") \n\n```\nabstract class AnimationCallback\n```\n\n|---|--------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.graphics.drawable.Animatable2.AnimationCallback](#) |\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------|---|\n| [AnimationCallback](#AnimationCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationEnd](#onAnimationEnd(android.graphics.drawable.Drawable))`(`drawable:` `[Drawable](/reference/kotlin/android/graphics/drawable/Drawable)!`)` Called when the animation ends. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationStart](#onAnimationStart(android.graphics.drawable.Drawable))`(`drawable:` `[Drawable](/reference/kotlin/android/graphics/drawable/Drawable)!`)` Called when the animation starts. |\n\nPublic constructors\n-------------------\n\n### AnimationCallback\n\n```\nAnimationCallback()\n```\n\nPublic methods\n--------------\n\n### onAnimationEnd\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAnimationEnd(drawable: Drawable!): Unit\n```\n\nCalled when the animation ends.\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------|\n| `drawable` | [Drawable](/reference/kotlin/android/graphics/drawable/Drawable)!: The drawable finished the animation. |\n\n### onAnimationStart\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAnimationStart(drawable: Drawable!): Unit\n```\n\nCalled when the animation starts.\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------|\n| `drawable` | [Drawable](/reference/kotlin/android/graphics/drawable/Drawable)!: The drawable started the animation. |"]]