smartScrollToPosition

open fun smartScrollToPosition(position: Int, viewWidth: Int, @NonNull recyclerView: RecyclerView, introduceDoublePageSkew: Boolean)

Scrolls the adapter to the selected position introducing an offset for placing it in the middle, and checks the gap for for fast-scrolling if is double the recycler view width.

Parameters

position

Position to scroll.

viewWidth

Selected view width.

recyclerView

Recycler view on which the scroll will be performed.

introduceDoublePageSkew

Extra room for centering the view when in double page mode.