calculateDistanceToFinalSnap
open fun calculateDistanceToFinalSnap(@NonNull layoutManager: RecyclerView.LayoutManager, @NonNull targetView: View): Array<Int>(source)
Override this method to snap to a particular point within the target view or the container view on any axis.
This method is called when the SnapHelper has intercepted a fling and it needs to know the exact distance required to scroll by in order to snap to the target view.
Return
the output coordinates the put the result into. out[0] is the distance on horizontal axis and out[1] is the distance on vertical axis.
Parameters
layoutManager
the RecyclerView.LayoutManager associated with the attached RecyclerView
targetView
the target view that is chosen as the view to snap