I have a complex list based UI that is based around scroll events. It's laid out in the following order
TextView
Tablayout --> Each tab is a textview of a LazyList section header
LazyList
SectionHeader
Item
Item
Item
SectionHeader
BottomButton
The screen needs to support the following interactions
- When a user selects a tab in the tablayout the LazyList scrolls to the corresponding StickHeader
- When the user scrolls so that a StickyHeader section reaches the top of the screen of the LazyList; so it is the top item of the list; and the divider line at the top of the item becomes visible the tablayout needs to scroll to the corresponding section.
So I need the following capabilities.
- For LazyList I need to be able to scroll to an item using the item position
- For StickyHeader I need an event for when the StickyHeader reaches the top of the screen; or it replaces the StickyHeader that is currently in 'Sticking' state. I also would need to get the position that it is in the list.
Are these possible? If you know how to do this and have any documentation please let me know!
rememberLazyListState()) scroll functions solve your first problem.