Android.Views.View.DispatchNestedPreFling Method
Dispatch a fling to a nested scrolling parent before it is processed by this view.

Syntax

[Android.Runtime.Register("dispatchNestedPreFling", "(FF)Z", "GetDispatchNestedPreFling_FFHandler")]
public virtual bool DispatchNestedPreFling (float velocityX, float velocityY)

Parameters

velocityX
Horizontal fling velocity in pixels per second
velocityY
Vertical fling velocity in pixels per second

Returns

Documentation for this section has not yet been entered.

Remarks

Dispatch a fling to a nested scrolling parent before it is processed by this view.

  • If a custom view is paged and needs to settle to a fixed page-point, do not call dispatchNestedPreFling; consume the fling and settle to a valid position regardless.
  • If a nested parent does consume the fling, this view should not scroll at all, even to settle back to a valid idle position.

Nested pre-fling events are to nested fling events what touch intercept is to touch and what nested pre-scroll is to nested scroll. dispatchNestedPreFling offsets an opportunity for the parent view in a nested fling to fully consume the fling before the child view consumes it. If this method returns true, a nested parent view consumed the fling and this view should not scroll as a result.

For a better user experience, only one view in a nested scrolling chain should consume the fling at a time. If a parent view consumed the fling this method will return false. Custom view implementations should account for this in two ways:

Views should also not offer fling velocities to nested parent views along an axis where scrolling is not currently supported; a Android.Widget.ScrollView should not offer a horizontal fling velocity to its parents since scrolling along that axis is not permitted and carrying velocity along that motion does not make sense.

[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