https://kotlinlang.org logo
Title
o

orangy

06/13/2022, 8:26 AM
Is it possible to change content of the sticky header in the LazyColumn when it is “hanging” over the content vs when it is rendered as a normal item?
m

myanmarking

06/13/2022, 9:30 AM
as far as i know, there is no feature for it. But the content is just a composable function. You can use the LazyListState to calculate when the item is sticky, and update it accordingly. My guess is that would be a bit of work 😛 But i think it is possible
o

orangy

06/13/2022, 11:59 AM
I understand it is composable, of course 🙂 Accessing
layoutInfo
is tricky, because it triggers recomposition, so one needs to go through
snapshotFlow
and such to calculate stuff. I’d prefer that
stickyHeader
receiver (which is just
LazyItemScope
currently), would be something like
LazyHeaderScope : LazyItemScope
and have an additional property like
floating : Boolean
a

andrew

07/31/2022, 2:22 AM
I second this, was searching through