Multiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose
1.7k
stars
75
forks
source link
Calculate size for individual items. This commented code currently hangs the UI ... #1254
Closed
github-actions[bot] closed 2 weeks ago
val item = items.itemForGlobalIndex(sizeForItemAtIndexPath.item.toInt()) collectionView.frame().useContents { item.sizeThatFits(size.readValue()).useContents { return CGSizeMake(width, height) } }
https://github.com/cashapp/redwood/blob/a4bbf1c2c8e718becede7d49ab06acc9813b8f80/redwood-lazylayout-uiview/src/commonMain/kotlin/app/cash/redwood/lazylayout/uiview/UIViewLazyList.kt#L170