public class GalleryLayoutManager
extends android.support.v7.widget.RecyclerView.LayoutManager
implements android.support.v7.widget.RecyclerView.SmoothScroller.ScrollVectorProvider
Gallery or a ViewPagerlike RecyclerView and
support both HORIZONTAL and VERTICAL scroll.
Created by chensuilun on 2016/11/18.| 限定符和类型 | 类和说明 |
|---|---|
static interface |
GalleryLayoutManager.ItemTransformer
A ItemTransformer is invoked whenever a attached item is scrolled.
|
static class |
GalleryLayoutManager.LayoutParams |
static interface |
GalleryLayoutManager.OnItemSelectedListener
Listen for changes to the selected item
|
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
HORIZONTAL |
static int |
VERTICAL |
| 构造器和说明 |
|---|
GalleryLayoutManager(int orientation) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
attach(android.support.v7.widget.RecyclerView recyclerView) |
void |
attach(android.support.v7.widget.RecyclerView recyclerView,
int selectedPosition) |
boolean |
canScrollHorizontally() |
boolean |
canScrollVertically() |
boolean |
checkLayoutParams(android.support.v7.widget.RecyclerView.LayoutParams lp) |
android.graphics.PointF |
computeScrollVectorForPosition(int targetPosition) |
android.support.v7.widget.RecyclerView.LayoutParams |
generateDefaultLayoutParams() |
android.support.v7.widget.RecyclerView.LayoutParams |
generateLayoutParams(android.content.Context c,
android.util.AttributeSet attrs) |
android.support.v7.widget.RecyclerView.LayoutParams |
generateLayoutParams(android.view.ViewGroup.LayoutParams lp) |
int |
getCurSelectedPosition() |
int |
getOrientation() |
android.support.v7.widget.OrientationHelper |
getOrientationHelper() |
github.hellocsl.layoutmanager.gallery.GalleryLayoutManager.State |
getState() |
void |
onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state) |
int |
scrollHorizontallyBy(int dx,
android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state) |
int |
scrollVerticallyBy(int dy,
android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state) |
void |
setCallbackInFling(boolean callbackInFling) |
void |
setItemTransformer(GalleryLayoutManager.ItemTransformer itemTransformer) |
void |
setOnItemSelectedListener(GalleryLayoutManager.OnItemSelectedListener onItemSelectedListener) |
void |
smoothScrollToPosition(android.support.v7.widget.RecyclerView recyclerView,
android.support.v7.widget.RecyclerView.State state,
int position) |
addDisappearingView, addDisappearingView, addView, addView, assertInLayoutOrScroll, assertNotInLayoutOrScroll, attachView, attachView, attachView, calculateItemDecorationsForChild, chooseSize, collectAdjacentPrefetchPositions, collectInitialPrefetchPositions, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, detachAndScrapAttachedViews, detachAndScrapView, detachAndScrapViewAt, detachView, detachViewAt, endAnimation, findContainingItemView, findViewByPosition, getBaseline, getBottomDecorationHeight, getChildAt, getChildCount, getChildMeasureSpec, getChildMeasureSpec, getClipToPadding, getColumnCountForAccessibility, getDecoratedBottom, getDecoratedBoundsWithMargins, 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, getTransformedBoundingBox, getWidth, getWidthMode, hasFocus, ignoreView, isAttachedToWindow, isAutoMeasureEnabled, isFocused, isItemPrefetchEnabled, isLayoutHierarchical, isMeasurementCacheEnabled, isSmoothScrolling, isViewPartiallyVisible, layoutDecorated, layoutDecoratedWithMargins, measureChild, measureChildWithMargins, moveView, offsetChildrenHorizontal, offsetChildrenVertical, onAdapterChanged, onAddFocusables, onAttachedToWindow, onDetachedFromWindow, onDetachedFromWindow, onFocusSearchFailed, onInitializeAccessibilityEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onInitializeAccessibilityNodeInfoForItem, onInterceptFocusSearch, onItemsAdded, onItemsChanged, onItemsMoved, onItemsRemoved, onItemsUpdated, onItemsUpdated, onLayoutCompleted, onMeasure, onRequestChildFocus, onRequestChildFocus, onRestoreInstanceState, onSaveInstanceState, onScrollStateChanged, performAccessibilityAction, performAccessibilityActionForItem, postOnAnimation, removeAllViews, removeAndRecycleAllViews, removeAndRecycleView, removeAndRecycleViewAt, removeCallbacks, removeDetachedView, removeView, removeViewAt, requestChildRectangleOnScreen, requestChildRectangleOnScreen, requestLayout, requestSimpleAnimationsInNextLayout, scrollToPosition, setAutoMeasureEnabled, setItemPrefetchEnabled, setMeasuredDimension, setMeasuredDimension, setMeasurementCacheEnabled, startSmoothScroll, stopIgnoringView, supportsPredictiveItemAnimationspublic static final int HORIZONTAL
public static final int VERTICAL
public int getOrientation()
public int getCurSelectedPosition()
public android.support.v7.widget.RecyclerView.LayoutParams generateDefaultLayoutParams()
generateDefaultLayoutParams 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic android.support.v7.widget.RecyclerView.LayoutParams generateLayoutParams(android.content.Context c,
android.util.AttributeSet attrs)
generateLayoutParams 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic android.support.v7.widget.RecyclerView.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams lp)
generateLayoutParams 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic boolean checkLayoutParams(android.support.v7.widget.RecyclerView.LayoutParams lp)
checkLayoutParams 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic void onLayoutChildren(android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state)
onLayoutChildren 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic github.hellocsl.layoutmanager.gallery.GalleryLayoutManager.State getState()
public android.graphics.PointF computeScrollVectorForPosition(int targetPosition)
computeScrollVectorForPosition 在接口中 android.support.v7.widget.RecyclerView.SmoothScroller.ScrollVectorProviderpublic boolean canScrollHorizontally()
canScrollHorizontally 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic boolean canScrollVertically()
canScrollVertically 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic int scrollHorizontallyBy(int dx,
android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state)
scrollHorizontallyBy 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic int scrollVerticallyBy(int dy,
android.support.v7.widget.RecyclerView.Recycler recycler,
android.support.v7.widget.RecyclerView.State state)
scrollVerticallyBy 在类中 android.support.v7.widget.RecyclerView.LayoutManagerpublic android.support.v7.widget.OrientationHelper getOrientationHelper()
public void setItemTransformer(GalleryLayoutManager.ItemTransformer itemTransformer)
public void setOnItemSelectedListener(GalleryLayoutManager.OnItemSelectedListener onItemSelectedListener)
public void attach(android.support.v7.widget.RecyclerView recyclerView)
public void attach(android.support.v7.widget.RecyclerView recyclerView,
int selectedPosition)
recyclerView - selectedPosition - public void setCallbackInFling(boolean callbackInFling)
public void smoothScrollToPosition(android.support.v7.widget.RecyclerView recyclerView,
android.support.v7.widget.RecyclerView.State state,
int position)
smoothScrollToPosition 在类中 android.support.v7.widget.RecyclerView.LayoutManager