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 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()

void decelerationRate(float 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.

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()

void maxDurationForFling(com.amazon.apmf.MonotonicDuration duration)
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.

Parameters

duration
com.amazon.apmf.MonotonicDuration — Required The maximum duration for a fling animation in MonotonicDuration.

build()

IFlingConfig* build()
This method creates the instance of IFlingConfig

Returns

IFlingConfig* The new IFlingConfig instance.
Last modified on October 29, 2026