findSnapView
Override this method to provide a particular target view for snapping.
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 a scroll. 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.
Return
the target view to which to snap on fling or end of scroll
Parameters
layoutManager
the RecyclerView.LayoutManager associated with the attached RecyclerView