onStartNestedScroll

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

Called when a descendant of the CoordinatorLayout attempts to initiate a nested scroll.

Any Behavior associated with any direct child of the CoordinatorLayout may respond to this event and return true to indicate that the CoordinatorLayout should act as a nested scrolling parent for this scroll. Only Behaviors that return true from this method will receive subsequent nested scroll events.

Return

true if the Behavior wishes to accept this 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 onStartNestedScroll(@NonNull coordinatorLayout: @NonNull CoordinatorLayout, @NonNull child: @NonNull V, @NonNull directTargetChild: @NonNull View, @NonNull target: @NonNull View, axes: Int): Boolean(source)

Deprecated

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