GridItemSpacingDecoration
class GridItemSpacingDecoration(itemSpacingHorizontalPx: Int, itemSpacingVerticalPx: Int) : RecyclerView.ItemDecoration
Content copied to clipboard
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)
Content copied to clipboard
Functions
Link copied to clipboard
open override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)
Content copied to clipboard
Inherited functions
Link copied to clipboard
Content copied to clipboard
Link copied to clipboard
open fun onDraw(@NonNull p0: Canvas, @NonNull p1: RecyclerView, @NonNull p2: RecyclerView.State)
Content copied to clipboard
Link copied to clipboard
open fun onDrawOver(@NonNull p0: Canvas, @NonNull p1: RecyclerView, @NonNull p2: RecyclerView.State)
Content copied to clipboard