- target
- View that initiated the nested scroll
- dx
- Horizontal scroll distance in pixels
- dy
- Vertical scroll distance in pixels
- consumed
- Output. The horizontal and vertical scroll distance consumed by this parent
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 View.DispatchNestedPreScroll(int, System.Int32, System.Int32, System.Int32). 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.