public abstract class SlideLayoutManagerBase extends RecyclerView.LayoutManager
RecyclerView.LayoutManager.Properties
Constructor and Description |
---|
SlideLayoutManagerBase() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(CurrentPositionChangeListener listener)
Adds a listener to be called when the current position changes.
|
boolean |
canScrollHorizontally() |
boolean |
canScrollVertically() |
RecyclerView.LayoutParams |
generateDefaultLayoutParams() |
int |
getCurrentPosition()
Gets the position of the current item.
|
boolean |
isScrollEnabled()
Gets a value indicating whether the users can use a gesture to move to adjacent items.
|
void |
onAdapterChanged(RecyclerView.Adapter oldAdapter,
RecyclerView.Adapter newAdapter) |
void |
onItemsAdded(RecyclerView recyclerView,
int positionStart,
int itemCount) |
void |
onItemsChanged(RecyclerView recyclerView) |
void |
onItemsMoved(RecyclerView recyclerView,
int from,
int to,
int itemCount) |
void |
onItemsRemoved(RecyclerView recyclerView,
int positionStart,
int itemCount) |
void |
onItemsUpdated(RecyclerView recyclerView,
int positionStart,
int itemCount) |
void |
onLayoutChildren(RecyclerView.Recycler recycler,
RecyclerView.State state) |
void |
onScrollStateChanged(int state) |
void |
removeListener(CurrentPositionChangeListener listener)
Removes a listener that is called when the current position changes.
|
int |
scrollHorizontallyBy(int dx,
RecyclerView.Recycler recycler,
RecyclerView.State state) |
void |
scrollToNext()
Scroll to the next position of the list and makes the next item current.
|
void |
scrollToPosition(int position) |
void |
scrollToPrevious()
Scroll to the previous position of the list and makes the next item current.
|
int |
scrollVerticallyBy(int dy,
RecyclerView.Recycler recycler,
RecyclerView.State state) |
void |
setCurrentPosition(int position)
Sets the position of an item that should become current.
|
void |
setScrollEnabled(boolean scrollEnabled)
Sets a value indicating whether the users can use a gesture to move to adjacent items.
|
boolean |
supportsPredictiveItemAnimations() |
addDisappearingView, addDisappearingView, addView, addView, assertInLayoutOrScroll, assertNotInLayoutOrScroll, attachView, attachView, attachView, calculateItemDecorationsForChild, checkLayoutParams, chooseSize, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, detachAndScrapAttachedViews, detachAndScrapView, detachAndScrapViewAt, detachView, detachViewAt, endAnimation, findContainingItemView, findViewByPosition, generateLayoutParams, generateLayoutParams, getBaseline, getBottomDecorationHeight, getChildAt, getChildCount, getChildMeasureSpec, getChildMeasureSpec, getClipToPadding, getColumnCountForAccessibility, getDecoratedBottom, getDecoratedLeft, getDecoratedMeasuredHeight, getDecoratedMeasuredWidth, getDecoratedRight, getDecoratedTop, getFocusedChild, getHeight, getHeightMode, getItemCount, getItemViewType, getLayoutDirection, getLeftDecorationWidth, getMinimumHeight, getMinimumWidth, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getPosition, getProperties, getRightDecorationWidth, getRowCountForAccessibility, getSelectionModeForAccessibility, getTopDecorationHeight, getWidth, getWidthMode, hasFocus, ignoreView, isAttachedToWindow, isAutoMeasureEnabled, isFocused, isLayoutHierarchical, isMeasurementCacheEnabled, isSmoothScrolling, layoutDecorated, measureChild, measureChildWithMargins, moveView, offsetChildrenHorizontal, offsetChildrenVertical, onAddFocusables, onAttachedToWindow, onDetachedFromWindow, onDetachedFromWindow, onFocusSearchFailed, onInitializeAccessibilityEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onInitializeAccessibilityNodeInfoForItem, onInterceptFocusSearch, onItemsUpdated, onMeasure, onRequestChildFocus, onRequestChildFocus, onRestoreInstanceState, onSaveInstanceState, performAccessibilityAction, performAccessibilityActionForItem, postOnAnimation, removeAllViews, removeAndRecycleAllViews, removeAndRecycleView, removeAndRecycleViewAt, removeCallbacks, removeDetachedView, removeView, removeViewAt, requestChildRectangleOnScreen, requestLayout, requestSimpleAnimationsInNextLayout, setAutoMeasureEnabled, setMeasuredDimension, setMeasuredDimension, setMeasurementCacheEnabled, smoothScrollToPosition, startSmoothScroll, stopIgnoringView
public void addListener(CurrentPositionChangeListener listener)
listener
- the new listener.public void removeListener(CurrentPositionChangeListener listener)
listener
- the listener to remove.public void scrollToNext()
public void scrollToPrevious()
public boolean isScrollEnabled()
public void setScrollEnabled(boolean scrollEnabled)
scrollEnabled
- the new value that will determine if swipes will trigger current item changes.public int getCurrentPosition()
public void setCurrentPosition(int position)
position
- the adapter position of an item that should become selected.public boolean canScrollHorizontally()
canScrollHorizontally
in class RecyclerView.LayoutManager
public boolean canScrollVertically()
canScrollVertically
in class RecyclerView.LayoutManager
public void scrollToPosition(int position)
scrollToPosition
in class RecyclerView.LayoutManager
public void onScrollStateChanged(int state)
onScrollStateChanged
in class RecyclerView.LayoutManager
public void onAdapterChanged(RecyclerView.Adapter oldAdapter, RecyclerView.Adapter newAdapter)
onAdapterChanged
in class RecyclerView.LayoutManager
public void onItemsAdded(RecyclerView recyclerView, int positionStart, int itemCount)
onItemsAdded
in class RecyclerView.LayoutManager
public void onItemsRemoved(RecyclerView recyclerView, int positionStart, int itemCount)
onItemsRemoved
in class RecyclerView.LayoutManager
public void onItemsChanged(RecyclerView recyclerView)
onItemsChanged
in class RecyclerView.LayoutManager
public void onItemsMoved(RecyclerView recyclerView, int from, int to, int itemCount)
onItemsMoved
in class RecyclerView.LayoutManager
public void onItemsUpdated(RecyclerView recyclerView, int positionStart, int itemCount)
onItemsUpdated
in class RecyclerView.LayoutManager
public RecyclerView.LayoutParams generateDefaultLayoutParams()
generateDefaultLayoutParams
in class RecyclerView.LayoutManager
public boolean supportsPredictiveItemAnimations()
supportsPredictiveItemAnimations
in class RecyclerView.LayoutManager
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state)
onLayoutChildren
in class RecyclerView.LayoutManager
public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, RecyclerView.State state)
scrollHorizontallyBy
in class RecyclerView.LayoutManager
public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state)
scrollVerticallyBy
in class RecyclerView.LayoutManager