LinearSnapHelper

(SESL variant) Implementation of the SnapHelper supporting snapping in either vertical or horizontal orientation.

The implementation will snap the center of the target child view to the center of the attached RecyclerView. If you intend to change this behavior then override calculateDistanceToFinalSnap.

Constructors

Link copied to clipboard
constructor()
constructor(velocityRatio: Float)
constructor(velocityRatio: Float, msPerInch: Float)
constructor(velocityRatio: Float, msPerInch: Float, decelerateTimeRatio: Int)

Functions

Link copied to clipboard
Override this method to snap to a particular point within the target view or the container view on any axis.
Link copied to clipboard
open fun findSnapView(layoutManager: RecyclerView.LayoutManager): View
Override this method to provide a particular target view for snapping.
Link copied to clipboard
open fun findTargetSnapPosition(layoutManager: RecyclerView.LayoutManager, velocityX: Int, velocityY: Int): Int
Override to provide a particular adapter target position for snapping.