Multiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose
1.65k
stars
73
forks
source link
Calculate size for individual items. This commented code currently hangs the UI ... #1254
Open
github-actions[bot] opened 1 year 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