Stay organized with collections
Save and categorize content based on your preferences.
AnticipateInterpolator
open class AnticipateInterpolator : BaseInterpolator
An interpolator where the change starts backward then flings forward.
Summary
Public methods |
open Float |
|
Public constructors
AnticipateInterpolator
AnticipateInterpolator()
AnticipateInterpolator
AnticipateInterpolator(tension: Float)
Parameters |
tension |
Float: Amount of anticipation. When tension equals 0.0f, there is no anticipation and the interpolator becomes a simple acceleration interpolator. |
Public methods
getInterpolation
open fun getInterpolation(t: Float): Float
Parameters |
input |
A value between 0 and 1.0 indicating our current point in the animation where 0 represents the start and 1.0 represents the end |
Return |
Float |
The interpolation value. This value can be more than 1.0 for interpolators which overshoot their targets, or less than 0 for interpolators that undershoot their targets. |
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,["# AnticipateInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAnticipateInterpolator\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/animation/AnticipateInterpolator \"View this page in Java\") \n\n```\nopen class AnticipateInterpolator : BaseInterpolator\n```\n\n|---|---|----------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.view.animation.BaseInterpolator](/reference/kotlin/android/view/animation/BaseInterpolator) ||\n| | ↳ | [android.view.animation.AnticipateInterpolator](#) |\n\nAn interpolator where the change starts backward then flings forward.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [AnticipateInterpolator](#AnticipateInterpolator())`()` \u003cbr /\u003e |\n| [AnticipateInterpolator](#AnticipateInterpolator(android.content.Context,%20android.util.AttributeSet))`(`context:` `[Context](../../content/Context.html#)!`, `attrs:` `[AttributeSet](../../util/AttributeSet.html#)!`)` \u003cbr /\u003e |\n| [AnticipateInterpolator](#AnticipateInterpolator(kotlin.Float))`(`tension:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getInterpolation](#getInterpolation(kotlin.Float))`(`t:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### AnticipateInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateInterpolator()\n``` \n\n### AnticipateInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateInterpolator(\n context: Context!, \n attrs: AttributeSet!)\n``` \n\n### AnticipateInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateInterpolator(tension: Float)\n```\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `tension` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): Amount of anticipation. When tension equals 0.0f, there is no anticipation and the interpolator becomes a simple acceleration interpolator. |\n\nPublic methods\n--------------\n\n### getInterpolation\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getInterpolation(t: Float): Float\n```\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------|\n| `input` | A value between 0 and 1.0 indicating our current point in the animation where 0 represents the start and 1.0 represents the end |\n\n| Return ||\n|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | The interpolation value. This value can be more than 1.0 for interpolators which overshoot their targets, or less than 0 for interpolators that undershoot their targets. |"]]