DifferentialMotionFlingTarget


public 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 methods

abstract float

Returns the scaled scroll factor to be used for differential motions.

abstract boolean

Start flinging on the target View by a given velocity.

abstract void

Stop any ongoing fling on the target View that is caused by a differential motion.

Public methods

getScaledScrollFactor

Added in 1.13.0
abstract float getScaledScrollFactor()

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

Added in 1.13.0
abstract boolean startDifferentialMotionFling(float velocity)

Start flinging on the target View by a given velocity.

Parameters
float velocity

the fling velocity, in pixels/second.

Returns
boolean

true if fling was successfully initiated, false otherwise.

stopDifferentialMotionFling

Added in 1.13.0
abstract void stopDifferentialMotionFling()

Stop any ongoing fling on the target View that is caused by a differential motion.