Google 致力于为黑人社区推动种族平等。查看具体举措

NestedScrollingChild

interface NestedScrollingChild
androidx.core.view.NestedScrollingChild

This interface should be implemented by View subclasses that wish to support dispatching nested scrolling operations to a cooperating parent ViewGroup.

Classes implementing this interface should create a final instance of a NestedScrollingChildHelper as a field and delegate any View methods to the NestedScrollingChildHelper methods of the same signature.

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 methods
abstract Boolean
dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean)

Dispatch a fling to a nested scrolling parent.

abstract Boolean
dispatchNestedPreFling(velocityX: Float, velocityY: Float)

Dispatch a fling to a nested scrolling parent before it is processed by this view.

abstract Boolean
dispatchNestedPreScroll(dx: Int, dy: Int, @Nullable consumed: IntArray?, @Nullable offsetInWindow: IntArray?)

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

abstract Boolean
dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: IntArray?)

Dispatch one step of a nested scroll in progress.

abstract