Is it possible to change content of the sticky hea...
# compose
o
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
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
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
I second this, was searching through