ItemDecoration
An ItemDecoration allows the application to add a special drawing and layout offset to specific item views from the adapter's data set. This can be useful for drawing dividers between items, highlights, visual grouping boundaries and more.
All ItemDecorations are drawn in the order they were added, before the item views (in onDraw() and after the items (in onDrawOver.
Inheritors
Functions
Link copied to clipboard
open fun getItemOffsets(@NonNull outRect: Rect, @NonNull view: View, @NonNull parent: RecyclerView, @NonNull state: RecyclerView.State)
Retrieve any offsets for the given item.
Link copied to clipboard
open fun onDraw(@NonNull c: Canvas, @NonNull parent: RecyclerView, @NonNull state: RecyclerView.State)
Draw any appropriate decorations into the Canvas supplied to the RecyclerView.
Link copied to clipboard
open fun onDrawOver(@NonNull c: Canvas, @NonNull parent: RecyclerView, @NonNull state: RecyclerView.State)
Draw any appropriate decorations into the Canvas supplied to the RecyclerView.
Link copied to clipboard
open fun seslOnDispatchDraw(@NonNull c: Canvas, @NonNull parent: RecyclerView, state: RecyclerView.State)