AutoFitGridLayoutManager

open class AutoFitGridLayoutManager(context: Context, itemSpacingPx: Int, gridItemMinimumWidthPx: Int) : GridListLayoutManager

A GridListLayoutManager that calculates number of columns in the layout depending on gridItemMinimumWidthPx size.

Parameters

context

The display context.

itemSpacingPx

The spacing between items in pixels.

gridItemMinimumWidthPx

The minimum width in pixels of a grid item, used to calculate the number of columns. Must be a positive value.

Constructors

Link copied to clipboard
constructor(context: Context, itemSpacingPx: Int, gridItemMinimumWidthPx: Int)

Functions

Link copied to clipboard
open override fun onAdapterChanged(oldAdapter: RecyclerView.Adapter<*>?, newAdapter: RecyclerView.Adapter<*>?)
Link copied to clipboard
open override fun onAttachedToWindow(view: RecyclerView)
Link copied to clipboard
open override fun onItemsChanged(recyclerView: RecyclerView)
Link copied to clipboard
open override fun onLayoutChildren(recycler: RecyclerView.Recycler, state: RecyclerView.State)
Link copied to clipboard
open override fun onLayoutCompleted(state: RecyclerView.State?)

Inherited functions

Link copied to clipboard
open fun addDisappearingView(p0: View)
open fun addDisappearingView(p0: View, p1: Int)
Link copied to clipboard
open fun addView(p0: View)
open fun addView(p0: View, p1: Int)
Link copied to clipboard
Link copied to clipboard
open override fun assertNotInLayoutOrScroll(p0: String)
Link copied to clipboard
open fun attachView(@NonNull p0: View)
open fun attachView(@NonNull p0: View, p1: Int)
open fun attachView(@NonNull p0: View, p1: Int, p2: RecyclerView.LayoutParams)
Link copied to clipboard
open fun calculateItemDecorationsForChild(@NonNull p0: View, @NonNull p1: Rect)
Link copied to clipboard
open override fun canScrollHorizontally(): Boolean
Link copied to clipboard
open override fun canScrollVertically(): Boolean
Link copied to clipboard
open override fun checkLayoutParams(p0: RecyclerView.LayoutParams): Boolean
Link copied to clipboard
open override fun collectAdjacentPrefetchPositions(p0: Int, p1: Int, p2: RecyclerView.State, p3: RecyclerView.LayoutManager.LayoutPrefetchRegistry)
Link copied to clipboard
open override fun collectInitialPrefetchPositions(p0: Int, p1: RecyclerView.LayoutManager.LayoutPrefetchRegistry)
Link copied to clipboard
open override fun computeHorizontalScrollExtent(p0: RecyclerView.State): Int
Link copied to clipboard
open override fun computeHorizontalScrollOffset(p0: RecyclerView.State): Int
Link copied to clipboard
open override fun computeHorizontalScrollRange(p0: RecyclerView.State): Int
Link copied to clipboard
open override fun computeScrollVectorForPosition(p0: Int): PointF?
Link copied to clipboard
open override fun computeVerticalScrollExtent(p0: RecyclerView.State): Int
Link copied to clipboard
open override fun computeVerticalScrollOffset(p0: RecyclerView.State): Int
Link copied to clipboard
open override fun computeVerticalScrollRange(p0: RecyclerView.State): Int
Link copied to clipboard
open fun detachAndScrapAttachedViews(@NonNull p0: RecyclerView.Recycler)
Link copied to clipboard
open fun detachAndScrapView(@NonNull p0: View, @NonNull p1: RecyclerView.Recycler)
Link copied to clipboard
open fun detachAndScrapViewAt(p0: Int, @NonNull p1: RecyclerView.Recycler)
Link copied to clipboard
open fun detachView(@NonNull p0: View)
Link copied to clipboard
open fun detachViewAt(p0: Int)
Link copied to clipboard
open fun endAnimation(p0: View)
Link copied to clipboard
@Nullable
open fun findContainingItemView(@NonNull p0: View): View?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun findViewByPosition(p0: Int): View?
Link copied to clipboard
open override fun generateDefaultLayoutParams(): RecyclerView.LayoutParams
Link copied to clipboard
open override fun generateLayoutParams(p0: ViewGroup.LayoutParams): RecyclerView.LayoutParams
open override fun generateLayoutParams(p0: Context, p1: AttributeSet): RecyclerView.LayoutParams
Link copied to clipboard
open fun getBaseline(): Int
Link copied to clipboard
open fun getBottomDecorationHeight(@NonNull p0: View): Int
Link copied to clipboard
@Nullable
open fun getChildAt(p0: Int): View?
Link copied to clipboard
open fun getChildCount(): Int
Link copied to clipboard
Link copied to clipboard
open override fun getColumnCountForAccessibility(p0: RecyclerView.Recycler, p1: RecyclerView.State): Int
Link copied to clipboard
open fun getDecoratedBottom(@NonNull p0: View): Int
Link copied to clipboard
open fun getDecoratedBoundsWithMargins(@NonNull p0: View, @NonNull p1: Rect)
Link copied to clipboard
open fun getDecoratedLeft(@NonNull p0: View): Int
Link copied to clipboard
open fun getDecoratedMeasuredHeight(@NonNull p0: View): Int
Link copied to clipboard
open fun getDecoratedMeasuredWidth(@NonNull p0: View): Int
Link copied to clipboard
open fun getDecoratedRight(@NonNull p0: View): Int
Link copied to clipboard
open fun getDecoratedTop(@NonNull p0: View): Int
Link copied to clipboard
@Nullable
open fun getFocusedChild(): View?
Link copied to clipboard
@Px
open fun getHeight(): Int
Link copied to clipboard
open fun getHeightMode(): Int
Link copied to clipboard
Link copied to clipboard
open fun getItemCount(): Int
Link copied to clipboard
open fun getItemViewType(@NonNull p0: View): Int
Link copied to clipboard
Link copied to clipboard
open fun getLeftDecorationWidth(@NonNull p0: View): Int
Link copied to clipboard
@Px
open fun getMinimumHeight(): Int
Link copied to clipboard
@Px
open fun getMinimumWidth(): Int
Link copied to clipboard
open fun getOrientation(): Int
Link copied to clipboard
@Px
open fun getPaddingBottom(): Int
Link copied to clipboard
@Px
open fun getPaddingEnd(): Int
Link copied to clipboard
@Px
open fun getPaddingLeft(): Int
Link copied to clipboard
@Px
open fun getPaddingRight(): Int
Link copied to clipboard
@Px
open fun getPaddingStart(): Int
Link copied to clipboard
@Px
open fun getPaddingTop(): Int
Link copied to clipboard
open fun getPosition(@NonNull p0: View): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getRightDecorationWidth(@NonNull p0: View): Int
Link copied to clipboard
open override fun getRowCountForAccessibility(p0: RecyclerView.Recycler, p1: RecyclerView.State): Int
Link copied to clipboard
open fun getSelectionModeForAccessibility(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State): Int
Link copied to clipboard
open fun getSpanCount(): Int
Link copied to clipboard
open fun getSpanSizeLookup(): GridLayoutManager.SpanSizeLookup
Link copied to clipboard
Link copied to clipboard
open fun getTopDecorationHeight(@NonNull p0: View): Int
Link copied to clipboard
open fun getTransformedBoundingBox(@NonNull p0: View, p1: Boolean, @NonNull p2: Rect)
Link copied to clipboard
@Px
open fun getWidth(): Int
Link copied to clipboard
open fun getWidthMode(): Int
Link copied to clipboard
open fun hasFocus(): Boolean
Link copied to clipboard
open fun ignoreView(@NonNull p0: View)
Link copied to clipboard
Link copied to clipboard
open override fun isAutoMeasureEnabled(): Boolean
Link copied to clipboard
open fun isFocused(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isLayoutHierarchical(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isViewPartiallyVisible(@NonNull p0: View, p1: Boolean, p2: Boolean): Boolean
Link copied to clipboard
open fun layoutDecorated(@NonNull p0: View, p1: Int, p2: Int, p3: Int, p4: Int)
Link copied to clipboard
open fun layoutDecoratedWithMargins(@NonNull p0: View, p1: Int, p2: Int, p3: Int, p4: Int)
Link copied to clipboard
open fun measureChild(@NonNull p0: View, p1: Int, p2: Int)
Link copied to clipboard
open fun measureChildWithMargins(@NonNull p0: View, p1: Int, p2: Int)
Link copied to clipboard
open fun moveView(p0: Int, p1: Int)
Link copied to clipboard
open fun offsetChildrenHorizontal(@Px p0: Int)
Link copied to clipboard
open fun offsetChildrenVertical(@Px p0: Int)
Link copied to clipboard
open fun onAddFocusables(@NonNull p0: RecyclerView, @NonNull p1: ArrayList<View>, p2: Int, p3: Int): Boolean
Link copied to clipboard
open fun onDetachedFromWindow(p0: RecyclerView)
open override fun onDetachedFromWindow(view: RecyclerView?, recycler: RecyclerView.Recycler?)
Link copied to clipboard
open override fun onFocusSearchFailed(p0: View, p1: Int, p2: RecyclerView.Recycler, p3: RecyclerView.State): View?
Link copied to clipboard
open override fun onInitializeAccessibilityEvent(p0: AccessibilityEvent)
open fun onInitializeAccessibilityEvent(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State, @NonNull p2: AccessibilityEvent)
Link copied to clipboard
open fun onInitializeAccessibilityNodeInfo(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State, @NonNull p2: AccessibilityNodeInfoCompat)
Link copied to clipboard
open override fun onInitializeAccessibilityNodeInfoForItem(p0: RecyclerView.Recycler, p1: RecyclerView.State, p2: View, p3: AccessibilityNodeInfoCompat)
Link copied to clipboard
@Nullable
open fun onInterceptFocusSearch(@NonNull p0: View, p1: Int): View?
Link copied to clipboard
open override fun onItemsAdded(p0: RecyclerView, p1: Int, p2: Int)
Link copied to clipboard
open override fun onItemsMoved(p0: RecyclerView, p1: Int, p2: Int, p3: Int)
Link copied to clipboard
open override fun onItemsRemoved(p0: RecyclerView, p1: Int, p2: Int)
Link copied to clipboard
open override fun onItemsUpdated(p0: RecyclerView, p1: Int, p2: Int, p3: Any?)
open fun onItemsUpdated(@NonNull p0: RecyclerView, p1: Int, p2: Int)
Link copied to clipboard
open fun onMeasure(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State, p2: Int, p3: Int)
Link copied to clipboard
open fun onRequestChildFocus(@NonNull p0: RecyclerView, @NonNull p1: View, @Nullable p2: View?): Boolean
open fun onRequestChildFocus(@NonNull p0: RecyclerView, @NonNull p1: RecyclerView.State, @NonNull p2: View, @Nullable p3: View?): Boolean
Link copied to clipboard
open override fun onRestoreInstanceState(p0: Parcelable)
Link copied to clipboard
open override fun onSaveInstanceState(): Parcelable?
Link copied to clipboard
Link copied to clipboard
open fun performAccessibilityAction(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State, p2: Int, @Nullable p3: Bundle?): Boolean
Link copied to clipboard
open fun performAccessibilityActionForItem(@NonNull p0: RecyclerView.Recycler, @NonNull p1: RecyclerView.State, @NonNull p2: View, p3: Int, @Nullable p4: Bundle?): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun prepareForDrop(@NonNull p0: View, @NonNull p1: View, p2: Int, p3: Int)
Link copied to clipboard
open fun removeAllViews()
Link copied to clipboard
open fun removeAndRecycleAllViews(@NonNull p0: RecyclerView.Recycler)
Link copied to clipboard
open fun removeAndRecycleView(@NonNull p0: View, @NonNull p1: RecyclerView.Recycler)
Link copied to clipboard
open fun removeAndRecycleViewAt(p0: Int, @NonNull p1: RecyclerView.Recycler)
Link copied to clipboard
Link copied to clipboard
open fun removeDetachedView(@NonNull p0: View)
Link copied to clipboard
open fun removeView(p0: View)
Link copied to clipboard
open fun removeViewAt(p0: Int)
Link copied to clipboard
open fun requestChildRectangleOnScreen(@NonNull p0: RecyclerView, @NonNull p1: View, @NonNull p2: Rect, p3: Boolean): Boolean
open fun requestChildRectangleOnScreen(@NonNull p0: RecyclerView, @NonNull p1: View, @NonNull p2: Rect, p3: Boolean, p4: Boolean): Boolean
Link copied to clipboard
open fun requestLayout()
Link copied to clipboard
open override fun scrollHorizontallyBy(p0: Int, p1: RecyclerView.Recycler, p2: RecyclerView.State): Int
Link copied to clipboard
open override fun scrollToPosition(p0: Int)
Link copied to clipboard
Link copied to clipboard
open override fun scrollVerticallyBy(p0: Int, p1: RecyclerView.Recycler, p2: RecyclerView.State): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun setMeasuredDimension(p0: Rect, p1: Int, p2: Int)
open fun setMeasuredDimension(p0: Int, p1: Int)
Link copied to clipboard
Link copied to clipboard
open fun setOrientation(p0: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setSpanCount(p0: Int)
Link copied to clipboard
open fun setSpanSizeLookup(p0: GridLayoutManager.SpanSizeLookup)
Link copied to clipboard
open override fun setStackFromEnd(p0: Boolean)
Link copied to clipboard
open override fun smoothScrollToPosition(p0: RecyclerView, p1: RecyclerView.State, p2: Int)
Link copied to clipboard
open fun startSmoothScroll(p0: RecyclerView.SmoothScroller)
Link copied to clipboard
open fun stopIgnoringView(@NonNull p0: View)
Link copied to clipboard