https://kotlinlang.org logo
#compose
Title
# compose
b

Benjamin Deroche

12/22/2021, 4:11 PM
Why does the
zIndex
do nothing in a
LazyVerticalGrid
? I've implemented a drag and drop feature that work perfectly well in
LazyColumn
and
LazyRow
, but in the
LazyVerticalGrid
, the
zIndex
I apply to the dragged element (to always show it on top) have no effect. The dragged element is always shown behind the next elements in the list and above the previous elements in the list. I also tried another "static" implementation using
Row
and
Column
but it have the same problem.
j

Jan Bína

12/22/2021, 6:09 PM
Well in
LazyVerticalGrid
, your item Composables are wrapped in another Row composable of which you have no control... and
zIndex
has effect only on composables that has the same parent
a

Andrey Kulikov

12/22/2021, 10:32 PM
we are currently working on refactoring LazyVerticalGrid to not add extra Row so all the children will be on the same layer exactly to enabled use cases like this
❤️ 6
17 Views