StickyHeaderSnapHelper

fun StickyHeaderSnapHelper(adapter: ListGroupItemsCollection<out ListGroupItem>, maxFlingVelocityPx: Int? = null, createScroller: (Context) -> Scroller = { Scroller(it, DecelerateInterpolator()) })

Parameters

adapter

The adapter is used to snap headers correctly.

maxFlingVelocityPx

The maximum fling velocity. Set it to limit the scroll range. If not set, RecyclerView.getMaxFlingVelocity is used.

createScroller

An optionally provided method to create a Scroller that is used in calculateScrollDistance.