Stay organized with collections
Save and categorize content based on your preferences.
AnimationListener
interface AnimationListener
An animation listener receives notifications from an animation. Notifications indicate animation related events, such as the end or the repetition of the animation.
Summary
Public methods |
abstract Unit |
Notifies the end of the animation.
|
abstract Unit |
Notifies the repetition of the animation.
|
abstract Unit |
Notifies the start of the animation.
|
Public methods
onAnimationEnd
abstract fun onAnimationEnd(animation: Animation!): Unit
Notifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.
Parameters |
animation |
Animation!: The animation which reached its end. |
onAnimationRepeat
abstract fun onAnimationRepeat(animation: Animation!): Unit
Notifies the repetition of the animation.
Parameters |
animation |
Animation!: The animation which was repeated. |
onAnimationStart
abstract fun onAnimationStart(animation: Animation!): Unit
Notifies the start of the animation.
Parameters |
animation |
Animation!: The started 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,["# Animation.AnimationListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAnimationListener\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/animation/Animation.AnimationListener \"View this page in Java\") \n\n```\ninterface AnimationListener\n```\n\n|---------------------------------------------------------|\n| [android.view.animation.Animation.AnimationListener](#) |\n\nAn animation listener receives notifications from an animation. Notifications indicate animation related events, such as the end or the repetition of the animation.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationEnd](#onAnimationEnd(android.view.animation.Animation))`(`animation:` `[Animation](/reference/kotlin/android/view/animation/Animation)!`)` Notifies the end of the animation. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationRepeat](#onAnimationRepeat(android.view.animation.Animation))`(`animation:` `[Animation](/reference/kotlin/android/view/animation/Animation)!`)` Notifies the repetition of the animation. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationStart](#onAnimationStart(android.view.animation.Animation))`(`animation:` `[Animation](/reference/kotlin/android/view/animation/Animation)!`)` Notifies the start of the animation. |\n\nPublic methods\n--------------\n\n### onAnimationEnd\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onAnimationEnd(animation: Animation!): Unit\n```\n\nNotifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------|\n| `animation` | [Animation](/reference/kotlin/android/view/animation/Animation)!: The animation which reached its end. |\n\n### onAnimationRepeat\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onAnimationRepeat(animation: Animation!): Unit\n```\n\nNotifies the repetition of the animation.\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------|\n| `animation` | [Animation](/reference/kotlin/android/view/animation/Animation)!: The animation which was repeated. |\n\n### onAnimationStart\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onAnimationStart(animation: Animation!): Unit\n```\n\nNotifies the start of the animation.\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------|\n| `animation` | [Animation](/reference/kotlin/android/view/animation/Animation)!: The started animation. |"]]