Slide 15
Slide 15 text
private fun addRow(position: Int, offsetY: Int, isAppend: Boolean,
recycler: Recycler): Int {
val view = recycler.getViewForPosition(position)
addView(view, if (isAppend) -1 else 0)
measureChildWithMargins(view, 0, 0)
val height = getDecoratedMeasuredHeight(view)
val width = getDecoratedMeasuredWidth(view)
val top = if (isAppend) offsetY else offsetY - height
val bottom = top + height
layoutDecoratedWithMargins(
view, parentLeft, top, parentLeft + width, bottom)
return height
}
PO-BZPVU$IJMESFO