NestedScrollingChildHelper

public class NestedScrollingChildHelper
extends Object

java.lang.Object
   ↳ androidx.core.view.NestedScrollingChildHelper


Helper class for implementing nested scrolling child views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21).

View subclasses should instantiate a final instance of this class as a field at construction. For each View method that has a matching method signature in this class, delegate the operation to the helper instance in an overridden method implementation. This implements the standard framework policy for nested scrolling.

Views invoking nested scrolling functionality should always do so from the relevant ViewCompat, ViewGroupCompat or ViewParentCompat compatibility shim static methods. This ensures interoperability with nested scrolling views on Android 5.0 Lollipop and newer.

Summary

Public constructors

NestedScrollingChildHelper(View view)

Construct a new helper for a given view.

Public methods

boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed)

Dispatch a nested fling operation to the current nested scrolling parent.

boolean dispatchNestedPreFling(float velocityX, float velocityY)

Dispatch a nested pre-fling operation to the current nested scrolling parent.

boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow)

Dispatch one step of a nested pre-scrolling operation to the current nested scrolling parent.

boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow, int type)

Dispatch one step of a nested pre-scrolling operation to the current nested scrolling parent.

void dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow, int type, int[] consumed)

Dispatch one step of a nested scrolling operation to the current nested scrolling parent.

boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow, int type)

Dispatch one step of a nested scrolling operation to the current nested scrolling parent.

boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow)

Dispatch one step of a nested scrolling operation to the current nested scrolling parent.

boolean hasNestedScrollingParent()

Check if this view has a nested scrolling parent view currently receiving events for a nested scroll in progress with the type of touch.

boolean hasNestedScrollingParent(int type)

Check if this view has a nested scrolling parent view currently receiving events for a nested scroll in progress with the given type.

boolean isNestedScrollingEnabled()

Check if nested scr