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: @NonNull Rect, itemPosition: Int, @NonNull parent: @NonNull RecyclerView)
open fun getItemOffsets(@NonNull outRect: @NonNull Rect, @NonNull view: @NonNull View, @NonNull parent: @NonNull RecyclerView, @NonNull state: @NonNull RecyclerView.State)
Retrieve any offsets for the given item.
Link copied to clipboard
open fun onDraw(@NonNull c: @NonNull Canvas, @NonNull parent: @NonNull RecyclerView, @NonNull state: @NonNull RecyclerView.State)
Draw any appropriate decorations into the Canvas supplied to the RecyclerView.
Link copied to clipboard
open fun onDrawOver(@NonNull c: @NonNull Canvas, @NonNull parent: @NonNull RecyclerView, @NonNull state: @NonNull RecyclerView.State)
Draw any appropriate decorations into the Canvas supplied to the RecyclerView.
Link copied to clipboard
open fun seslOnDispatchDraw(@NonNull c: @NonNull Canvas, @NonNull parent: @NonNull RecyclerView, state: RecyclerView.State)