Is it possible to define a z-Index for LazyColumns...
# compose
a
Is it possible to define a z-Index for LazyColumns items? The usecase is a draggable list item that should be drawn on top of all other list items so it wont disappear behind list items below it while it is being dragged
s
You can change the z-index with
Modifier.zIndex
, at least. 👍
a
a
@sindrenm this won't work in LazyColumns though, would it? Since it only affects composables that share a parent. I had no luck at least, but maybe I am doing something wrong. Wouldn't know what though @Andrei Kovalev thanks, I'll check it out!
a
@Alex I had to come up with custom LazyGrid solution which was basically the copy of LazyGrid + workaround with zIndex which was passed via local compisition
s
Oh, my bad. I wasn't aware that
zIndex
only worked for composables sharing the same parent.