CustomSpeedLinearSnapHelper

Implementation of the LinearSnapHelper supporting hscroll custom target child view

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

Constructors

Link copied to clipboard
constructor(deltaJumpThreshold: Int)

Functions

Link copied to clipboard
open fun attachToRecyclerView(recyclerView: RecyclerView)
Link copied to clipboard
open fun calculateDistanceToFinalSnap(layoutManager: RecyclerView.LayoutManager, targetView: View): Array<Int>
Link copied to clipboard
open fun calculateScrollDistance(velocityX: Int, velocityY: Int): Array<Int>
Link copied to clipboard
open fun findSnapView(layoutManager: RecyclerView.LayoutManager): View
Link copied to clipboard
open fun findTargetSnapPosition(layoutManager: RecyclerView.LayoutManager, velocityX: Int, velocityY: Int): Int
Link copied to clipboard
open fun onFling(velocityX: Int, velocityY: Int): Boolean