onNestedScrollAccepted

open fun onNestedScrollAccepted(@NonNull coordinatorLayout: @NonNull CoordinatorLayout, @NonNull child: @NonNull V, @NonNull directTargetChild: @NonNull View, @NonNull target: @NonNull View, axes: Int, type: Int)(source)

Called when a nested scroll has been accepted by the CoordinatorLayout.

Any Behavior associated with any 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.

Parameters

coordinatorLayout

the CoordinatorLayout parent of the view this Behavior is associated with

child

the child view of the CoordinatorLayout this Behavior is associated with

directTargetChild

the child view of the CoordinatorLayout that either is or contains the target of the nested scroll operation

target

the descendant view of the CoordinatorLayout initiating the nested scroll

axes

the axes that this nested scroll applies to. See SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_VERTICAL

type

the type of input which cause this scroll event

See also


open fun onNestedScrollAccepted(@NonNull coordinatorLayout: @NonNull CoordinatorLayout, @NonNull child: @NonNull V, @NonNull directTargetChild: @NonNull View, @NonNull target: @NonNull View, axes: Int)(source)

Deprecated

You should now override onNestedScrollAccepted. This method will still continue to be called if the type is TYPE_TOUCH.