Interface IFlingConfigBuilder
interface IFlingConfigBuilder
Extends com.amazon.apmf.IStandard
The interface for building Fling configuration objects.
This interface defines methods for setting various configuration parameters
for Fling animations and building a corresponding Fling configuration object.
Methods
decelerationRate()
Set the deceleration rate for fling scrolling animation. The deceleration rate determines how quickly scrolling animations, such as fling animations, come to a stop. A lower deceleration rate results in slower animations and a longer duration for the scroll to come to a complete stop, while a higher deceleration rate results in faster animations and a shorter duration.voiddecelerationRate(floatdecelerationRate)
Parameters
decelerationRate
float — Required
The desired deceleration rate, which should be a value between 0 and 1 exclusive:
- Value closer to 0 represents gradual stop.
- Value closer to 1.0 represents instant stop. The default value is 0.998 if the provided value is outside this range.
maxDurationForFling()
Set the maximum duration for a fling animation. Use this method to set the maximum duration, in MonotonicDuration, for a fling animation. A fling animation occurs when the user performs a quick swipe or flick gesture, and the view continues scrolling with inertia. This maximum duration limits how long the fling animation can last.voidmaxDurationForFling(com.amazon.apmf.MonotonicDurationduration)
Parameters
duration
com.amazon.apmf.MonotonicDuration — Required
The maximum duration for a fling animation in MonotonicDuration.
build()
This method creates the instance ofIFlingConfig*build()
IFlingConfig
Returns
IFlingConfig*
The new IFlingConfig instance.

