Status Update
Comments
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit dce95f0a931da95ad38e24c94d3496241e0c1954
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Jan 26 19:38:35 2022
Support content types in Lazy grids
Relnote: You can now specify the content type for the items of LazyVerticalGrid - item/items functions on LazyGridScope now accept such parameter. Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type.
Fixes: 215372836
Test: LazyGridSlotsReuseTest
Change-Id: I7b3550cf626b6ef6f65029b1e55465266bfacb18
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGrid.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScopeImpl.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSlotsReuseTest.kt
https://android-review.googlesource.com/1960712
Branch: androidx-main
commit dce95f0a931da95ad38e24c94d3496241e0c1954
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Jan 26 19:38:35 2022
Support content types in Lazy grids
Relnote: You can now specify the content type for the items of LazyVerticalGrid - item/items functions on LazyGridScope now accept such parameter. Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type.
Fixes: 215372836
Test: LazyGridSlotsReuseTest
Change-Id: I7b3550cf626b6ef6f65029b1e55465266bfacb18
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGrid.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridItemsProviderImpl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridScopeImpl.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSlotsReuseTest.kt
uo...@google.com <uo...@google.com> #3
To enhance performance, we chose to avoid implementing an onItemLayout callback, which might trigger unnecessary recompositions.
As an alternative, please explore utilizing our newest features, ContextualFlowRow and ContextualFlowColumn.
These options offer you insights into various contextual information like lineIndex, indexInLine, and additional details including maxWidthInLine and maxHeight for every index call.
We believe this approach will assist in effectively styling components according to their placement. Your feedback would be greatly appreciated!
na...@google.com <na...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation-layout:1.7.0-alpha04
androidx.compose.foundation:foundation-layout-android:1.7.0-alpha04
androidx.compose.foundation:foundation-layout-desktop:1.7.0-alpha04
Description