IViewParent.OnNestedScroll(View, Int32, Int32, Int32, Int32) Method

Definition

React to a nested scroll in progress.

[Android.Runtime.Register("onNestedScroll", "(Landroid/view/View;IIII)V", "GetOnNestedScroll_Landroid_view_View_IIIIHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnNestedScroll (Android.Views.View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed);
[<Android.Runtime.Register("onNestedScroll", "(Landroid/view/View;IIII)V", "GetOnNestedScroll_Landroid_view_View_IIIIHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnNestedScroll : Android.Views.View * int * int * int * int -> unit

Parameters

target
View

The descendent view controlling the nested scroll

dxConsumed
Int32

Horizontal scroll distance in pixels already consumed by target

dyConsumed
Int32

Vertical scroll distance in pixels already consumed by target

dxUnconsumed
Int32

Horizontal scroll distance in pixels not consumed by target

dyUnconsumed
Int32

Vertical scroll distance in pixels not consumed by target

Attributes

Remarks

React to a nested scroll in progress.

This method will be called when the ViewParent's current nested scrolling child view dispatches a nested scroll event. To receive calls to this method the ViewParent must have previously returned true for a call to #onStartNestedScroll(View, View, int).

Both the consumed and unconsumed portions of the scroll distance are reported to the ViewParent. An implementation may choose to use the consumed portion to match or chase scroll position of multiple child elements, for example. The unconsumed portion may be used to allow continuous dragging of multiple scrolling or draggable elements, such as scrolling a list within a vertical drawer where the drawer begins dragging once the edge of inner scrolling content is reached.

Java documentation for android.view.ViewParent.onNestedScroll(android.view.View, int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to