In `LazyListScope` there is a `stickyHeader { }` f...
# compose
g
In
LazyListScope
there is a
stickyHeader { }
function. I’d like to achieve the same behavior, but for sticky footer: the item should stick to the bottom until the user scrolls to it, and after the user scrolls further down, the item has to scroll normally together with the content. Is there some smart way to achieve this behavior?
c
What does that look like? Could you share a video or mock?
g
@Chris Sinco [G] Sorry for the delayed response. I was able to achieve this behavior by setting
reverseLayout = true
to the
LazyColumn
and using a
stickyHeader
. But I actually don’t want to reverse the layout while keeping this “sticky footer” behavior.
c
Gotcha - @Andrey Kulikov any suggestions?
a
Hey. There is no easy solution for it yet unfortunately. stickyHeaders are still experimental. Ideally we want to try to reimplement it on top of the public api so this is way more customizable. But no clear timeline on it yet
g
Ok, thanks! Maybe there is at least some suggestion on how to mimic the same behavior without implementing a custom lazy list composable?
c
Considering you got it working with the reverseLayout, you could reverse the list itself that you pass, which should counter the order of your layout, and still give you the stickyHeader on the bottom?
g
I thought there may be some issues with initial scrolling position etc., but thanks, I’ll give it a shot!