Stay organized with collections
Save and categorize content based on your preferences.
LinearInterpolator
open class LinearInterpolator : BaseInterpolator
An interpolator where the rate of change is constant
Summary
Public methods |
open Float |
|
Public constructors
LinearInterpolator
LinearInterpolator()
Public methods
getInterpolation
open fun getInterpolation(input: Float): Float
Parameters |
input |
Float: 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,["# LinearInterpolator\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nLinearInterpolator\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/animation/LinearInterpolator \"View this page in Java\") \n\n```\nopen class LinearInterpolator : 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.LinearInterpolator](#) |\n\nAn interpolator where the rate of change is constant\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [LinearInterpolator](#LinearInterpolator())`()` \u003cbr /\u003e |\n| [LinearInterpolator](#LinearInterpolator(android.content.Context,%20android.util.AttributeSet))`(`context:` `[Context](../../content/Context.html#)!`, `attrs:` `[AttributeSet](../../util/AttributeSet.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))`(`input:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### LinearInterpolator\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLinearInterpolator()\n``` \n\n### LinearInterpolator\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLinearInterpolator(\n context: Context!, \n attrs: AttributeSet!)\n```\n\nPublic methods\n--------------\n\n### getInterpolation\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getInterpolation(input: Float): Float\n```\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `input` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): 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. |"]]