setMaximumVelocity

open fun setMaximumVelocity(horizontalMax: Float, verticalMax: Float): AutoScrollHelper(source)

Sets the absolute maximum scrolling velocity.

If relative velocity is not specified, scrolling will always reach the same maximum velocity. If both relative and maximum velocities are specified, the maximum velocity will be used to clamp the calculated relative velocity.

Return

The scroll helper, which may used to chain setter calls.

Parameters

horizontalMax

The maximum horizontal scrolling velocity, or NO_MAX to leave the relative value unconstrained.

verticalMax

The maximum vertical scrolling velocity, or NO_MAX to leave the relative value unconstrained.