NestedScrollingChild2
interface NestedScrollingChild2 : NestedScrollingChild
androidx.core.view.NestedScrollingChild2 |
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 all versions of Android.
Summary
Public methods | |
---|---|
abstract Boolean |
dispatchNestedPreScroll(dx: Int, dy: Int, @Nullable consumed: IntArray?, @Nullable offsetInWindow: IntArray?, type: Int) 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?, type: Int) Dispatch one step of a nested scroll in progress. |
abstract Boolean |
hasNestedScrollingParent(type: Int) Returns true if this view has a nested scrolling parent for the given input type. |
abstract Boolean |
startNestedScroll(axes: Int, type: Int) Begin a nestable scroll operation along the given axes, for the given input type. |
abstract Unit |
stopNestedScroll(type: Int) Stop a nested scroll in progress for the given input type. |
Inherited functions | |
---|---|