is not called at all when `listState.scrollToItem`is called manually?
a
Albert Chang
10/21/2021, 3:44 PM
Yes. Nested scroll is only triggered for user interaction.
t
Tolriq
10/21/2021, 4:28 PM
Hum ๐ So what would be the proper way to calculate the offset to manually call the listener ? (Like for a collapsible toolbar and draggable scroll bar working together properly)
a
Albert Chang
10/22/2021, 12:24 AM
You don't need to. App bars don't react to programmatic scrolls.
t
Tolriq
10/22/2021, 5:21 AM
This was an example. I have added a draggable scroll bar to the lazy list. When user scroll manually I have a component that offset to be visible or not. The component should go back to visible when the user fastscroll up and hide when down. Dragging a scroll bar is user scrolling. Since lazycolumn does not support that we need to many scroll from code. So yes it's needed for a few uses cases. For large list I can just detect direction and animate for small list not being synchronized as when manually scrolling looks not natural.
s
saket
10/22/2021, 8:41 PM
Yes. Nested scroll is only triggered for user interaction.
I donโt believe this is the same behavior in traditional Views so this sounds like a bug to me. @Tolriq wanna file a bug report?