onNestedPreScroll
Called when a nested scroll in progress is about to update, before the target has consumed any of the scrolled distance.
Any Behavior associated with the direct child of the CoordinatorLayout may elect to accept the nested scroll as part of onStartNestedScroll. Each Behavior that returned true will receive subsequent nested scroll events for that nested scroll.
onNestedPreScroll
is called each time the nested scroll is updated by the nested scrolling child, before the nested scrolling child has consumed the scroll distance itself. Each Behavior responding to the nested scroll will receive the same values. The CoordinatorLayout will report as consumed the maximum number of pixels in either direction that any Behavior responding to the nested scroll reported as consumed.
Parameters
the CoordinatorLayout parent of the view this Behavior is associated with
the child view of the CoordinatorLayout this Behavior is associated with
the descendant view of the CoordinatorLayout performing the nested scroll
the raw horizontal number of pixels that the user attempted to scroll
the raw vertical number of pixels that the user attempted to scroll
out parameter. consumed[0] should be set to the distance of dx that was consumed, consumed[1] should be set to the distance of dy that was consumed
the type of input which cause this scroll event
See also
Deprecated
You should now override onNestedPreScroll. This method will still continue to be called if the type is TYPE_TOUCH.