RoundedCornerDecoration

class RoundedCornerDecoration(context: Context, val adapter: RecyclerView.Adapter<*>, @ColorInt val roundedCornerColor: Int) : RecyclerView.ItemDecoration(source)

An RecyclerView.ItemDecoration that draws rounded corners for items in a RecyclerView.

This decoration handles different types of items, including headers, footers, and regular items, applying appropriate rounded corners to each.

Parameters

context

The Context used to create the rounded corner drawables.

adapter

The RecyclerView.Adapter associated with the RecyclerView. This is used to determine the type of each item and apply the correct rounded corners.

roundedCornerColor

The color to be used for the rounded corners.

Constructors

Link copied to clipboard
constructor(context: Context, adapter: RecyclerView.Adapter<*>, @ColorInt roundedCornerColor: Int)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun seslOnDispatchDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State)