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
Functions
Link copied to clipboard
open fun calculateDistanceToFinalSnap(@NonNull layoutManager: RecyclerView.LayoutManager, @NonNull targetView: View): Array<Int>
Override this method to snap to a particular point within the target view or the container view on any axis.
Link copied to clipboard
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.