DifferentialMotionFlingTarget
interface DifferentialMotionFlingTarget
Represents an entity that may be flung by a differential motion or an entity that initiates fling on a target View.
Summary
Public functions |
|
|---|---|
Float |
Returns the scaled scroll factor to be used for differential motions. |
Boolean |
startDifferentialMotionFling(velocity: Float)Start flinging on the target View by a given velocity. |
Unit |
Stop any ongoing fling on the target View that is caused by a differential motion. |
Public functions
getScaledScrollFactor
fun getScaledScrollFactor(): Float
Returns the scaled scroll factor to be used for differential motions. This is the value that the raw MotionEvent values should be multiplied with to get pixels.
This usually is one of the values provided by ViewConfigurationCompat. It is up to the client to choose and provide any value as per its internal configuration.
startDifferentialMotionFling
fun startDifferentialMotionFling(velocity: Float): Boolean
Start flinging on the target View by a given velocity.
| Parameters | |
|---|---|
velocity: Float |
the fling velocity, in pixels/second. |
| Returns | |
|---|---|
Boolean |
|
stopDifferentialMotionFling
fun stopDifferentialMotionFling(): Unit
Stop any ongoing fling on the target View that is caused by a differential motion.