attachToRecyclerView

open fun attachToRecyclerView(@Nullable recyclerView: RecyclerView)

Attaches the SnapHelper to the provided RecyclerView, by calling setOnFlingListener. You can call this method with null to detach it from the current RecyclerView.

Parameters

recyclerView

The RecyclerView instance to which you want to add this helper or null if you want to remove SnapHelper from the current RecyclerView.

Throws