Stay organized with collections
Save and categorize content based on your preferences.
AnticipateOvershootInterpolator
open class AnticipateOvershootInterpolator : BaseInterpolator
An interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value.
Summary
Public methods |
open Float |
|
Public constructors
AnticipateOvershootInterpolator
AnticipateOvershootInterpolator()
AnticipateOvershootInterpolator
AnticipateOvershootInterpolator(
context: Context!,
attrs: AttributeSet!)
AnticipateOvershootInterpolator
AnticipateOvershootInterpolator(tension: Float)
Parameters |
tension |
Float: Amount of anticipation/overshoot. When tension equals 0.0f, there is no anticipation/overshoot and the interpolator becomes a simple acceleration/deceleration interpolator. |
AnticipateOvershootInterpolator
AnticipateOvershootInterpolator(
tension: Float,
extraTension: Float)
Parameters |
tension |
Float: Amount of anticipation/overshoot. When tension equals 0.0f, there is no anticipation/overshoot and the interpolator becomes a simple acceleration/deceleration interpolator. |
extraTension |
Float: Amount by which to multiply the tension. For instance, to get the same overshoot as an OvershootInterpolator with a tension of 2.0f, you would use an extraTension of 1.5f. |
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,["# AnticipateOvershootInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAnticipateOvershootInterpolator\n===============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/animation/AnticipateOvershootInterpolator \"View this page in Java\") \n\n```\nopen class AnticipateOvershootInterpolator : 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.AnticipateOvershootInterpolator](#) |\n\nAn interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [AnticipateOvershootInterpolator](#AnticipateOvershootInterpolator())`()` \u003cbr /\u003e |\n| [AnticipateOvershootInterpolator](#AnticipateOvershootInterpolator(android.content.Context,%20android.util.AttributeSet))`(`context:` `[Context](../../content/Context.html#)!`, `attrs:` `[AttributeSet](../../util/AttributeSet.html#)!`)` \u003cbr /\u003e |\n| [AnticipateOvershootInterpolator](#AnticipateOvershootInterpolator(kotlin.Float))`(`tension:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` \u003cbr /\u003e |\n| [AnticipateOvershootInterpolator](#AnticipateOvershootInterpolator(kotlin.Float,%20kotlin.Float))`(`tension:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`, `extraTension:` `[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### AnticipateOvershootInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateOvershootInterpolator()\n``` \n\n### AnticipateOvershootInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateOvershootInterpolator(\n context: Context!, \n attrs: AttributeSet!)\n``` \n\n### AnticipateOvershootInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateOvershootInterpolator(tension: Float)\n```\n\n| Parameters ||\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `tension` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): Amount of anticipation/overshoot. When tension equals 0.0f, there is no anticipation/overshoot and the interpolator becomes a simple acceleration/deceleration interpolator. |\n\n### AnticipateOvershootInterpolator\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAnticipateOvershootInterpolator(\n tension: Float, \n extraTension: Float)\n```\n\n| Parameters ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `tension` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): Amount of anticipation/overshoot. When tension equals 0.0f, there is no anticipation/overshoot and the interpolator becomes a simple acceleration/deceleration interpolator. |\n| `extraTension` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): Amount by which to multiply the tension. For instance, to get the same overshoot as an OvershootInterpolator with a tension of 2.0f, you would use an extraTension of 1.5f. |\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. |"]]