Stay organized with collections
Save and categorize content based on your preferences.
TimeAnimator.TimeListener
public
static
interface
TimeAnimator.TimeListener
android.animation.TimeAnimator.TimeListener
|
Implementors of this interface can set themselves as update listeners
to a TimeAnimator
instance to receive callbacks on every animation
frame to receive the total time since the animator started and the delta time
since the last frame. The first time the listener is called,
deltaTime will be zero. The same is true for totalTime, unless the animator was
set to a specific currentPlayTime
prior to starting.
Summary
Public methods |
abstract
void
|
onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime)
Notifies listeners of the occurrence of another frame of the animation,
along with information about the elapsed time.
|
Public methods
onTimeUpdate
public abstract void onTimeUpdate (TimeAnimator animation,
long totalTime,
long deltaTime)
Notifies listeners of the occurrence of another frame of the animation,
along with information about the elapsed time.
Parameters |
animation |
TimeAnimator : The animator sending out the notification. |
totalTime |
long : The total time elapsed since the animator started, in milliseconds. |
deltaTime |
long : The time elapsed since the previous frame, in milliseconds. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TimeAnimator.TimeListener\n\nAdded in [API level 16](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTimeAnimator.TimeListener\n=========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/animation/TimeAnimator.TimeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nTimeAnimator.TimeListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------|\n| android.animation.TimeAnimator.TimeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nImplementors of this interface can set themselves as update listeners\nto a `TimeAnimator` instance to receive callbacks on every animation\nframe to receive the total time since the animator started and the delta time\nsince the last frame. The first time the listener is called,\ndeltaTime will be zero. The same is true for totalTime, unless the animator was\nset to a specific [currentPlayTime](/reference/android/animation/ValueAnimator#setCurrentPlayTime(long))\nprior to starting.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onTimeUpdate](/reference/android/animation/TimeAnimator.TimeListener#onTimeUpdate(android.animation.TimeAnimator,%20long,%20long))`(`[TimeAnimator](/reference/android/animation/TimeAnimator)` animation, long totalTime, long deltaTime) ` \u003cbr /\u003e Notifies listeners of the occurrence of another frame of the animation, along with information about the elapsed time. |\n\nPublic methods\n--------------\n\n### onTimeUpdate\n\nAdded in [API level 16](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTimeUpdate (TimeAnimator animation, \n long totalTime, \n long deltaTime)\n```\n\n\u003cbr /\u003e\n\nNotifies listeners of the occurrence of another frame of the animation,\nalong with information about the elapsed time.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------|\n| `animation` | `TimeAnimator`: The animator sending out the notification. \u003cbr /\u003e |\n| `totalTime` | `long`: The total time elapsed since the animator started, in milliseconds. \u003cbr /\u003e |\n| `deltaTime` | `long`: The time elapsed since the previous frame, in milliseconds. \u003cbr /\u003e |"]]