Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IInterpolator

interface IInterpolator
Extends com.amazon.apmf.IStandard Interface for interpolating the progress of an animation. This interface allows customizing the pace of an animation by defining how the animation progresses. The user is expected to implement or customize this interface to define the desired interpolation behavior for their animation and set it via IAnimatorBuilder::interpolator.

Methods

getInterpolation()

float getInterpolation(float elapsedFraction)
Maps a value representing the elapsed fraction of an animation to a value that represents the interpolated fraction. This interpolated value is then multiplied by the change in value of an animation to derive the animated value at the current elapsed fraction of animation. For example, consider an animation that changes the opacity of IView from 0.0 (fully transparent) to 1.0 (fully opaque) over a duration of 2 seconds. If the elapsed fraction is 0.25, and the interpolator returns 0.6, the animated opacity value at that point would be 0.6, which is 60% of the total change (1.0 - 0.0 = 1.0).

Parameters

elapsedFraction
float — Required A value between 0.0 and 1.0 indicating our current point in the animation where 0.0 represents the start and 1.0 represents the end.

Returns

float The interpolation value. This value can be more than 1.0 for interpolator which overshoot its target, or less than 0.0 for interpolator that undershoot its target.
Last modified on October 29, 2026