Hello, I am trying to make a custom sticky header ...
# compose
n
Hello, I am trying to make a custom sticky header as I can’t utilize `LazyColumn`’s because status bar is transparent and there is no `TopBar`(only mimic) in my case so I can’t get the desired
offset
and
index
at the right time in no way. Can you tell me how can I show my sticky header once the respective item almost goes out of view? Screen recording in the thread
For ex, sticky header is the
5th
item but it goes out of view when
firstVisibleItemIndex
is
2
, worse if I expand description component, it then goes out of view when
firstVisibleItemIndex
is
4
so index is not working reliably in my case
Current index is not synchronized with scroll state. For example; index of the Sort By view is
4
but
lazyListState
returns
4
too late for example when I am on the
There are currently no items in the list
text. Is that correct or is it an issue? , I didn't understand
m
What do you mean by current index
n
I meant
firstVisiblemItemIndex
but I got it to working, thanks anyway!
m
You can use the layout info too
n
yes exactly, I did use layout info + key combination