类 HorizontalPageLayoutManager

  • 所有已实现的接口:
    PageDecorationLastJudge

    public class HorizontalPageLayoutManager
    extends androidx.recyclerview.widget.RecyclerView.LayoutManager
    implements PageDecorationLastJudge
    This LayoutManager provides pagination effects similar to ViewPager+GridView. Refer to:https://blog.csdn.net/Y_sunny_U/article/details/89500464
    • 嵌套类概要

      • 从类继承的嵌套类/接口 androidx.recyclerview.widget.RecyclerView.LayoutManager

        androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry, androidx.recyclerview.widget.RecyclerView.LayoutManager.Properties
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      boolean canScrollHorizontally()  
      int computeHorizontalScrollExtent​(androidx.recyclerview.widget.RecyclerView.State state)  
      int computeHorizontalScrollOffset​(androidx.recyclerview.widget.RecyclerView.State state)  
      int computeHorizontalScrollRange​(androidx.recyclerview.widget.RecyclerView.State state)  
      androidx.recyclerview.widget.RecyclerView.LayoutParams generateDefaultLayoutParams()  
      boolean isAutoMeasureEnabled()
      Returns true using recyclerView for automatic measurement
      boolean isLastColumn​(int position)
      Is the last Colum in one row;
      boolean isLastRow​(int index)
      Is the last row in one page
      boolean isPageLast​(int position)  
      void onDetachedFromWindow​(androidx.recyclerview.widget.RecyclerView view, androidx.recyclerview.widget.RecyclerView.Recycler recycler)  
      void onLayoutChildren​(androidx.recyclerview.widget.RecyclerView.Recycler recycler, androidx.recyclerview.widget.RecyclerView.State state)  
      void onMeasure​(androidx.recyclerview.widget.RecyclerView.Recycler recycler, androidx.recyclerview.widget.RecyclerView.State state, int widthSpec, int heightSpec)  
      int scrollHorizontallyBy​(int dx, androidx.recyclerview.widget.RecyclerView.Recycler recycler, androidx.recyclerview.widget.RecyclerView.State state)  
      void setItemHeight​(int height)  
      • 从类继承的方法 androidx.recyclerview.widget.RecyclerView.LayoutManager

        addDisappearingView, addDisappearingView, addView, addView, assertInLayoutOrScroll, assertNotInLayoutOrScroll, attachView, attachView, attachView, calculateItemDecorationsForChild, canScrollVertically, checkLayoutParams, chooseSize, collectAdjacentPrefetchPositions, collectInitialPrefetchPositions, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, detachAndScrapAttachedViews, detachAndScrapView, detachAndScrapViewAt, detachView, detachViewAt, endAnimation, findContainingItemView, findViewByPosition, generateLayoutParams, generateLayoutParams, 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, isFocused, isItemPrefetchEnabled, isLayoutHierarchical, isMeasurementCacheEnabled, isSmoothScrolling, isViewPartiallyVisible, layoutDecorated, layoutDecoratedWithMargins, measureChild, measureChildWithMargins, moveView, offsetChildrenHorizontal, offsetChildrenVertical, onAdapterChanged, onAddFocusables, onAttachedToWindow, onDetachedFromWindow, onFocusSearchFailed, onInitializeAccessibilityEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onInitializeAccessibilityNodeInfoForItem, onInterceptFocusSearch, onItemsAdded, onItemsChanged, onItemsMoved, onItemsRemoved, onItemsUpdated, onItemsUpdated, onLayoutCompleted, onRequestChildFocus, onRequestChildFocus, onRestoreInstanceState, onSaveInstanceState, onScrollStateChanged, performAccessibilityAction, performAccessibilityActionForItem, postOnAnimation, removeAllViews, removeAndRecycleAllViews, removeAndRecycleView, removeAndRecycleViewAt, removeCallbacks, removeDetachedView, removeView, removeViewAt, requestChildRectangleOnScreen, requestChildRectangleOnScreen, requestLayout, requestSimpleAnimationsInNextLayout, scrollToPosition, scrollVerticallyBy, setAutoMeasureEnabled, setItemPrefetchEnabled, setMeasuredDimension, setMeasuredDimension, setMeasurementCacheEnabled, smoothScrollToPosition, startSmoothScroll, stopIgnoringView, supportsPredictiveItemAnimations
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • HorizontalPageLayoutManager

        public HorizontalPageLayoutManager​(int rows,
                                           int columns)
    • 方法详细资料

      • generateDefaultLayoutParams

        public androidx.recyclerview.widget.RecyclerView.LayoutParams generateDefaultLayoutParams()
        指定者:
        generateDefaultLayoutParams 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • setItemHeight

        public void setItemHeight​(int height)
      • canScrollHorizontally

        public boolean canScrollHorizontally()
        覆盖:
        canScrollHorizontally 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • scrollHorizontallyBy

        public int scrollHorizontallyBy​(int dx,
                                        androidx.recyclerview.widget.RecyclerView.Recycler recycler,
                                        androidx.recyclerview.widget.RecyclerView.State state)
        覆盖:
        scrollHorizontallyBy 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • onMeasure

        public void onMeasure​(@NonNull
                              androidx.recyclerview.widget.RecyclerView.Recycler recycler,
                              @NonNull
                              androidx.recyclerview.widget.RecyclerView.State state,
                              int widthSpec,
                              int heightSpec)
        覆盖:
        onMeasure 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • isAutoMeasureEnabled

        public boolean isAutoMeasureEnabled()
        Returns true using recyclerView for automatic measurement
        覆盖:
        isAutoMeasureEnabled 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
        返回:
      • onLayoutChildren

        public void onLayoutChildren​(androidx.recyclerview.widget.RecyclerView.Recycler recycler,
                                     androidx.recyclerview.widget.RecyclerView.State state)
        覆盖:
        onLayoutChildren 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • onDetachedFromWindow

        public void onDetachedFromWindow​(androidx.recyclerview.widget.RecyclerView view,
                                         androidx.recyclerview.widget.RecyclerView.Recycler recycler)
        覆盖:
        onDetachedFromWindow 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • computeHorizontalScrollRange

        public int computeHorizontalScrollRange​(androidx.recyclerview.widget.RecyclerView.State state)
        覆盖:
        computeHorizontalScrollRange 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • computeHorizontalScrollOffset

        public int computeHorizontalScrollOffset​(androidx.recyclerview.widget.RecyclerView.State state)
        覆盖:
        computeHorizontalScrollOffset 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager
      • computeHorizontalScrollExtent

        public int computeHorizontalScrollExtent​(androidx.recyclerview.widget.RecyclerView.State state)
        覆盖:
        computeHorizontalScrollExtent 在类中 androidx.recyclerview.widget.RecyclerView.LayoutManager