smoothScrollBy

open fun smoothScrollBy(@Px dx: Int, @Px dy: Int)(source)

Animate a scroll by the given amount of pixels along either axis.

Parameters

dx

Pixels to scroll horizontally

dy

Pixels to scroll vertically


open fun smoothScrollBy(@Px dx: Int, @Px dy: Int, @Nullable interpolator: Interpolator)(source)

Animate a scroll by the given amount of pixels along either axis.

Parameters

dx

Pixels to scroll horizontally

dy

Pixels to scroll vertically

interpolator

Interpolator to be used for scrolling. If it is null, RecyclerView will use an internal default interpolator.


open fun smoothScrollBy(@Px dx: Int, @Px dy: Int, @Nullable interpolator: Interpolator, duration: Int)(source)

Smooth scrolls the RecyclerView by a given distance.

Parameters

dx

x distance in pixels.

dy

y distance in pixels.

interpolator

Interpolator to be used for scrolling. If it is null, RecyclerView will use an internal default interpolator.

duration

Duration of the animation in milliseconds. Set to UNDEFINED_DURATION to have the duration be automatically calculated based on an internally defined standard initial velocity. A duration less than 1 (that does not equal UNDEFINED_DURATION), will result in a call to scrollBy.