GridItemSpacingDecoration
class GridItemSpacingDecoration(itemSpacingHorizontalPx: Int, itemSpacingVerticalPx: Int = itemSpacingHorizontalPx) : RecyclerView.ItemDecoration
A RecyclerView.ItemDecoration used to add the spacing to items in GridLayoutManager.
Parameters
itemSpacingHorizontalPx
The horizontal spacing in pixels which is proportionally added to the left and the right, according to the item position.
itemSpacingVerticalPx
The vertical spacing in pixels which is added at the bottom of all grid items except the last row. The default value is the same as itemSpacingHorizontalPx.
Constructors
Link copied to clipboard
fun GridItemSpacingDecoration(itemSpacingHorizontalPx: Int, itemSpacingVerticalPx: Int = itemSpacingHorizontalPx)
Functions
Link copied to clipboard
open override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)
Inherited functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onDrawOver(@NonNull p0: Canvas, @NonNull p1: RecyclerView, @NonNull p2: RecyclerView.State)