onStartNestedScroll

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

React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate.

This method will be called in response to a descendant view invoking startNestedScroll. Each parent up the view hierarchy will be given an opportunity to respond and claim the nested scrolling operation by returning true.

This method may be overridden by ViewParent implementations to indicate when the view is willing to support a nested scrolling operation that is about to begin. If it returns true, this ViewParent will become the target view's nested scrolling parent for the duration of the scroll operation in progress. When the nested scroll is finished this ViewParent will receive a call to onStopNestedScroll.

Return

true if this ViewParent accepts the nested scroll operation

Parameters

child

Direct child of this ViewParent containing target

target

View that initiated the nested scroll

axes

Flags consisting of SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_VERTICAL or both

type

the type of input which cause this scroll event


open fun onStartNestedScroll(@NonNull child: View, @NonNull target: View, axes: Int): Boolean(source)