findSnapView

open override fun findSnapView(layoutManager: RecyclerView.LayoutManager): View?

This method is called when the SnapHelper is ready to start snapping and requires a target view to snap to. It will be explicitly called when the scroll state becomes idle after scrolling. It will also be called when the SnapHelper is preparing to snap after a fling and requires a reference view from the current set of child views. If this method returns null, SnapHelper will not snap to any view. This method is overridden to find the closest view to the top or sticky header.

Throws

when layoutManager cannot scroll vertically.