EpoxyItemSpacingDecorator

open class EpoxyItemSpacingDecorator : RecyclerView.ItemDecoration

Modifies item spacing in a recycler view so that items are equally spaced no matter where they are on the grid. Only designed to work with standard linear or grid layout managers.

Constructors

EpoxyItemSpacingDecorator
Link copied to clipboard
open fun EpoxyItemSpacingDecorator()
EpoxyItemSpacingDecorator
Link copied to clipboard
open fun EpoxyItemSpacingDecorator(@Px() pxBetweenItems: Int)

Functions

getItemOffsets
Link copied to clipboard
open fun getItemOffsets(outRect: Rect, itemPosition: Int, parent: RecyclerView)
open fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)
onDraw
Link copied to clipboard
open fun onDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State)
onDrawOver
Link copied to clipboard
open fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State)

Properties

pxBetweenItems
Link copied to clipboard
private open var pxBetweenItems: Int