Condividi tramite


View.DispatchNestedPreScroll(Int32, Int32, Int32[], Int32[]) Method

Definition

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

[Android.Runtime.Register("dispatchNestedPreScroll", "(II[I[I)Z", "GetDispatchNestedPreScroll_IIarrayIarrayIHandler")]
public virtual bool DispatchNestedPreScroll (int dx, int dy, int[]? consumed, int[]? offsetInWindow);
[<Android.Runtime.Register("dispatchNestedPreScroll", "(II[I[I)Z", "GetDispatchNestedPreScroll_IIarrayIarrayIHandler")>]
abstract member DispatchNestedPreScroll : int * int * int[] * int[] -> bool
override this.DispatchNestedPreScroll : int * int * int[] * int[] -> bool

Parameters

dx
Int32

Horizontal scroll distance in pixels

dy
Int32

Vertical scroll distance in pixels

consumed
Int32[]

Output. If not null, consumed[0] will contain the consumed component of dx and consumed[1] the consumed dy.

offsetInWindow
Int32[]

Optional. If not null, on return this will contain the offset in local view coordinates of this view from before this operation to after it completes. View implementations may use this to adjust expected input coordinate tracking.

Returns

true if the parent consumed some or all of the scroll delta

Attributes

Remarks

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

Nested pre-scroll events are to nested scroll events what touch intercept is to touch. dispatchNestedPreScroll offers an opportunity for the parent view in a nested scrolling operation to consume some or all of the scroll operation before the child view consumes it.

Java documentation for android.view.View.dispatchNestedPreScroll(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

See also

  • <xref:Android.Views.View.DispatchNestedScroll(System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32)>