Android.Views.IViewParent.OnNestedPreScroll Method
React to a nested scroll in progress before the target view consumes a portion of the scroll.

Syntax

[Android.Runtime.Register("onNestedPreScroll", "(Landroid/view/View;II[I)V", "GetOnNestedPreScroll_Landroid_view_View_IIarrayIHandler:Android.Views.IViewParentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnNestedPreScroll (View target, int dx, int dy, int[] consumed)

Parameters

target
View that initiated the nested scroll
dx
Horizontal scroll distance in pixels
dy
Vertical scroll distance in pixels
consumed
Output. The horizontal and vertical scroll distance consumed by this parent

Remarks

React to a nested scroll in progress before the target view consumes a portion of the scroll.

When working with nested scrolling often the parent view may want an opportunity to consume the scroll before the nested scrolling child does. An example of this is a drawer that contains a scrollable list. The user will want to be able to scroll the list fully into view before the list itself begins scrolling.

onNestedPreScroll is called when a nested scrolling child invokes View.DispatchNestedPreScroll(int, System.Int32, System.Int32, System.Int32). The implementation should report how any pixels of the scroll reported by dx, dy were consumed in the consumed array. Index 0 corresponds to dx and index 1 corresponds to dy. This parameter will never be null. Initial values for consumed[0] and consumed[1] will always be 0.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1