public class SnapUtil extends Object
RecyclerView
.Modifier and Type | Class and Description |
---|---|
static interface |
SnapUtil.SnapMode |
Modifier and Type | Field and Description |
---|---|
static int |
SNAP_NONE |
static int |
SNAP_TO_CENTER |
static int |
SNAP_TO_CENTER_CHILD |
static int |
SNAP_TO_CENTER_CHILD_WITH_CUSTOM_SPEED |
static int |
SNAP_TO_END |
static int |
SNAP_TO_START |
static int |
SNAP_TO_START_DEFAULT_FLING_OFFSET |
Constructor and Description |
---|
SnapUtil() |
Modifier and Type | Method and Description |
---|---|
static RecyclerView.SmoothScroller |
getSmoothScrollerWithOffset(Context context,
int offset,
SmoothScrollAlignmentType type) |
static SnapHelper |
getSnapHelper(int snapMode,
int deltaJumpThreshold,
int startSnapFlingOffset) |
static int |
getSnapModeFromString(String snapString) |
public static final int SNAP_NONE
public static final int SNAP_TO_END
public static final int SNAP_TO_START
public static final int SNAP_TO_CENTER
public static final int SNAP_TO_CENTER_CHILD
public static final int SNAP_TO_CENTER_CHILD_WITH_CUSTOM_SPEED
public static final int SNAP_TO_START_DEFAULT_FLING_OFFSET
public static SnapHelper getSnapHelper(int snapMode, int deltaJumpThreshold, int startSnapFlingOffset)
public static RecyclerView.SmoothScroller getSmoothScrollerWithOffset(Context context, int offset, SmoothScrollAlignmentType type)
androidx.recyclerview.widget.RecyclerView.SmoothScroller
that takes snapping
into account.public static int getSnapModeFromString(String snapString)