setRelativeVelocity

open fun setRelativeVelocity(horizontal: Float, vertical: Float): AutoScrollHelper(source)

Sets the target scrolling velocity relative to the host view's dimensions.

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

horizontal

The target horizontal velocity as a fraction of the host view width per second, or RELATIVE_UNSPECIFIED to ignore.

vertical

The target vertical velocity as a fraction of the host view height per second, or RELATIVE_UNSPECIFIED to ignore.