added in version 25.1.0
belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1
belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1
LinearSnapHelper
public
class
LinearSnapHelper
extends SnapHelper
java.lang.Object | |||
↳ | android.support.v7.widget.RecyclerView.OnFlingListener | ||
↳ | android.support.v7.widget.SnapHelper | ||
↳ | android.support.v7.widget.LinearSnapHelper |
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(RecyclerView.LayoutManager, View)
.
Summary
Public constructors | |
---|---|
LinearSnapHelper()
|
Public methods | |
---|---|
int[]
|
calculateDistanceToFinalSnap(RecyclerView.LayoutManager layoutManager, View targetView)
Override this method to snap to a particular point within the target view or the container view on any axis. |
View
|
findSnapView(RecyclerView.LayoutManager layoutManager)
Override this method to provide a particular target view for snapping. |
int
|
findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY)
Override to provide a particular adapter target position for snapping. |
Inherited methods | |
---|---|
![]()
android.support.v7.widget.SnapHelper
| |
![]()
android.support.v7.widget.RecyclerView.OnFlingListener
| |
![]()
java.lang.Object
|