for (i in 0 until childSize) {
val child = parent.getChildAt(i)
val layoutParams = child.layoutParams as RecyclerView.LayoutParams
val top = child.bottom + layoutParams.bottomMargin
val bottom = top + 5
if (mPaint != null) {
c.drawRect(left.toFloat(), top.toFloat(), right.toFloat(), bottom.toFloat(), mPaint)
}
}
网友评论