onNestedPreScroll
React to a nested scroll in progress before the target view consumes a portion of the scroll.
When working with nested scrolling often the parent view may want an opportunity to consume the scroll before the nested scrolling child does. An example of this is a drawer that contains a scrollable list. The user will want to be able to scroll the list fully into view before the list itself begins scrolling.
onNestedPreScroll
is called when a nested scrolling child invokes dispatchNestedPreScroll. The implementation should report how any pixels of the scroll reported by dx, dy were consumed in the consumed
array. Index 0 corresponds to dx and index 1 corresponds to dy. This parameter will never be null. Initial values for consumed[0] and consumed[1] will always be 0.
Parameters
View that initiated the nested scroll
Horizontal scroll distance in pixels
Vertical scroll distance in pixels
Output. The horizontal and vertical scroll distance consumed by this parent
the type of input which cause this scroll event