Is there any way to overlap items in LazyList? In ...
# compose
d
Is there any way to overlap items in LazyList? In RecyclerView we could set negative offsets in
ItemDecoration#getItemOffsets
I tried
Modifier#offset
, but seems it affects only the item on which the modifier was applied, so items below do not shift
r
This seems hacky, but you could apply increasing offsets at an index. Not sure if you’d end up with a bunch of empty space in the column though.
m
I think spacedBy modifier allows for negative space. Please check
🐕 1
d
Robert's hack works, but yeah, there is some empty space left at the bottom of the column. Tried
verticalArrangement = spacedBy
, but all items now overlap. What I need is to shift some specific items. I think I'll use offset modifier for now, even though result isn't ideal
z
You could file a feature request for this. Tracker link is in channel topic
🙏 2
m
Yes please. A spaceBy modifier that receives an index and the item and returns the space would be very helfull @Zach Klippenstein (he/him) [MOD]
z
If you file a feature request, I would suggest describing what you’re actually trying to achieve, rather than specifically saying a modifier (although you could propose a modifier as a possible/example solution). I’m not sure a modifier is actually the right thing here.