compat/src/main/java/androidx/core/view/ViewCompat.java
public static boolean dispatchNestedScroll(@NonNull View view, int dxConsumed, int dyConsumed,
            int dxUnconsumed, int dyUnconsumed, @Nullable int[] offsetInWindow,
            @NestedScrollType int type) {
        if (view instanceof NestedScrollingChild2) {
            return ((NestedScrollingChild2) view).dispatchNestedScroll(dxConsumed, dyConsumed,
                    dxUnconsumed, dyUnconsumed, offsetInWindow, type);
        } else if (type == ViewCompat.TYPE_TOUCH) {
            return dispatchNestedScroll(view, dxConsumed, dyConsumed, dxUnconsumed,
                    dyUnconsumed, offsetInWindow);
        }
        return false;
    }
/**
     * Dispatch one step of a nested scroll in progress.
     *
     * <p>Implementations of views that support nested scrolling should call this to report
     * info about a scroll in progress to the current nested scrolling parent. If a nested scroll
     * is not currently in progress or nested scrolling is not
     * {@link #isNestedScrollingEnabled(View) enabled} for this view this method does nothing.</p>
     *
     * <p>Compatible View implementations should also call
     * {@link #dispatchNestedPreScroll(View, int, int, int[], int[]) dispatchNestedPreScroll} before
     * consuming a component of the scroll event themselves.</p>
     *
     * @param dxConsumed Horizontal distance in pixels consumed by this view during this scroll step
     * @param dyConsumed Vertical distance in pixels consumed by this view during this scroll step
     * @param dxUnconsumed Horizontal scroll distance in pixels not consumed by this view
     * @param dyUnconsumed Horizontal scroll distance in pixels not consumed by this view
     * @param offsetInWindow Optional. If not null, on return this will contain the offset
     *                       in local view coordinates of this view from before this operation
     *                       to after it completes. View implementations may use this to adjust
     *                       expected input coordinate tracking.
     * @param type the type of input which cause this scroll event
     * @return true if the event was dispatched, false if it could not be dispatched.
     * @see #dispatchNestedPreScroll(View, int, int, int[], int[])
     */
Dispatch one step of a nested scroll in progress.
Implementations of views that support nested scrolling should call this to report
info about a scroll in progress to the current nested scrolling parent. If a nested scroll
is not currently in progress or nested scrolling is not
#isNestedScrollingEnabled(View) enabled for this view this method does nothing.

Compatible View implementations should also call
#dispatchNestedPreScroll(View, int, int, int[], int[]) dispatchNestedPreScroll before
consuming a component of the scroll event themselves.


Dispatch one step of a nested scroll in progress . Implementations of views that support nested scrolling should call this to report info about a scroll in progress to the current nested scrolling parent . If a nested scroll is not currently in progress or nested scrolling is not #isNestedScrollingEnabled ( View ) enabled for this view this method does nothing . Compatible View implementations should also call #dispatchNestedPreScroll ( View int int int [] int [] ) dispatchNestedPreScroll before consuming a component of the scroll event themselves .
public static boolean dispatchNestedScroll(@NonNull View view, int dxConsumed, int dyConsumed,
            int dxUnconsumed, int dyUnconsumed, @Nullable int[] offsetInWindow,
            @NestedScrollType int type) {
        if (view instanceof NestedScrollingChild2) {
            return ((NestedScrollingChild2) view).dispatchNestedScroll(dxConsumed, dyConsumed,
                    dxUnconsumed, dyUnconsumed, offsetInWindow, type);
        } else if (type == ViewCompat.TYPE_TOUCH) {
            return dispatchNestedScroll(view, dxConsumed, dyConsumed, dxUnconsumed,
                    dyUnconsumed, offsetInWindow);
        }
        return false;
    }
public static boolean dispatchNestedScroll ( @ NonNull View view , int dxConsumed , int dyConsumed , int dxUnconsumed , int dyUnconsumed , @ Nullable int [ ] offsetInWindow , @ NestedScrollType int type ) { if ( view instanceof NestedScrollingChild2 ) { return ( ( NestedScrollingChild2 ) view ) . dispatchNestedScroll ( dxConsumed , dyConsumed , dxUnconsumed , dyUnconsumed , offsetInWindow , type ) ; } else if ( type == ViewCompat . TYPE_TOUCH ) { return dispatchNestedScroll ( view , dxConsumed , dyConsumed , dxUnconsumed , dyUnconsumed , offsetInWindow ) ; } return false ; }
Dispatch one step of a nested scroll in progress.
Dispatch one step of a nested scroll in progress .