layoutDecoratedWithMargins

open fun layoutDecoratedWithMargins(@NonNull child: View, left: Int, top: Int, right: Int, bottom: Int)(source)

Lay out the given child view within the RecyclerView using coordinates that include any current ItemDecorations and margins.

LayoutManagers should prefer working in sizes and coordinates that include item decoration insets whenever possible. This allows the LayoutManager to effectively ignore decoration insets within measurement and layout code. See the following methods:

Parameters

child

Child to lay out

left

Left edge, with item decoration insets and left margin included

top

Top edge, with item decoration insets and top margin included

right

Right edge, with item decoration insets and right margin included

bottom

Bottom edge, with item decoration insets and bottom margin included

See also