Fixed
Status Update
Comments
sj...@gmail.com <sj...@gmail.com> #2
Any progress on this? I really need it ;)
Currently I "simulate" a grid by using a LazyColumn
that holds multiple LazyRows
with some headers in-between that take the full width. This is terrible performance-wise. I would like to replace this with a LazyVerticalGrid
. However as long as the grid does not support gaps in lines before a "full-span" header I cannot use it :(
sj...@gmail.com <sj...@gmail.com> #3
As a workaround, if the last row before a header is incomplete and does not contain as many items as cells are declared, I fill up the row with Spacer()
items. So for instance if the last row contains 1 item but 3 cells are declared, I add two spacers via items(List(remainingItems) { 0 }) { Spacer() }
. It's not beautiful but it works ;)
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 0cdb26cb2a13f377cc2a9f1b55c0ddccc98c0470
Author: Mihai Popa <popam@google.com>
Date: Mon Feb 07 14:52:37 2022
Support "line breaking" in lazy grids with spans
Relnote: LazyVerticalGrid now supports `line breaking` before items with span not fitting inside the current line.
Fixes: 207462103
Test: LazyGridSpanTest
Change-Id: I05c405c9ccf81fb1682a8f84eb36481d3b13ceea
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSpanLayoutProvider.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSpanTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGridSpan.kt
https://android-review.googlesource.com/1974461
Branch: androidx-main
commit 0cdb26cb2a13f377cc2a9f1b55c0ddccc98c0470
Author: Mihai Popa <popam@google.com>
Date: Mon Feb 07 14:52:37 2022
Support "line breaking" in lazy grids with spans
Relnote: LazyVerticalGrid now supports `line breaking` before items with span not fitting inside the current line.
Fixes: 207462103
Test: LazyGridSpanTest
Change-Id: I05c405c9ccf81fb1682a8f84eb36481d3b13ceea
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSpanLayoutProvider.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridSpanTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyGridSpan.kt
io...@gmail.com <io...@gmail.com> #5
starting from which version of compose can I check the fix?
an...@google.com <an...@google.com> #6
It should be available in Compose 1.2
Description
No description yet.