ItemDecorationWithMeasureFunction

Creates an ItemDecoration that provides the developer a function to measure the View if the insets required depend on the measured size of the View. The measure function will use the size constraints recorded by Binder of the Recycler Component. This approach is required because the RecyclerView gets the insets from the ItemDecoration before the View is measured, so the measured size of the view is 0, and the insets would not be correct.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun getItemOffsets(@NonNull p0: Rect, p1: Int, @NonNull p2: RecyclerView)
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)
abstract fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State, measure: View.() -> Unit)
Link copied to clipboard
Link copied to clipboard