scrollToPositionWithOffset

open fun scrollToPositionWithOffset(position: Int, offset: Int)(source)

Scroll to the specified adapter position with the given offset from layout start.

Note that scroll position change will not be reflected until the next layout call.

If you are just trying to make a position visible, use scrollToPosition.

Parameters

position

Index (starting at 0) of the reference item.

offset

The distance (in pixels) between the start edge of the item view and start edge of the RecyclerView.

See also