public class SnappingSmoothScroller extends LinearSmoothScroller
Extends the behavior of the LinearSmoothScroller
by providing the 1 option.
RecyclerView.SmoothScroller.Action
Modifier and Type | Field and Description |
---|---|
static int |
SNAP_BOTTOM |
static int |
SNAP_CENTER |
static int |
SNAP_NONE |
static int |
SNAP_TOP |
SNAP_TO_ANY, SNAP_TO_END, SNAP_TO_START
Modifier and Type | Method and Description |
---|---|
int |
calculateDtToFit(int viewStart,
int viewEnd,
int boxStart,
int boxEnd,
int snapPreference) |
PointF |
computeScrollVectorForPosition(int targetPosition) |
int |
getSnapMode()
Gets the snap mode of the scroller.
|
void |
setSnapMode(int snapMode)
Gets the snap mode of the scroller.
|
calculateDxToMakeVisible, calculateDyToMakeVisible
findViewByPosition, getChildCount, getChildPosition, getLayoutManager, getTargetPosition, instantScrollToPosition, isPendingInitialRun, isRunning, setTargetPosition
public static final int SNAP_NONE
public static final int SNAP_CENTER
public static final int SNAP_TOP
public static final int SNAP_BOTTOM
public int getSnapMode()
public void setSnapMode(int snapMode)
public PointF computeScrollVectorForPosition(int targetPosition)
computeScrollVectorForPosition
in class LinearSmoothScroller
public int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference)
calculateDtToFit
in class LinearSmoothScroller