LazyColumnͷitem͕ViewPortͷதͰΊΔྖҬͷׂ߹ΛΓ͍ͨ
ViewPort ʹऩ·͍ͬͯΔ item ͷߴ͞
fun LazyListState.visibleHeight(itemInfo: LazyListItemInfo): Int {
val start = (layoutInfo.viewportStartOffset + itemInfo.offset)
.coerceAtLeast(0)
val end = (itemInfo.offset + itemInfo.size - layoutInfo.viewportEndOffset)
.coerceAtLeast(itemInfo.offset + itemInfo.size)
.coerceAtMost(layoutInfo.viewportSize.height)
return end - start
}
Shibuya.apk #45