Share via


View.DispatchNestedFling(Single, Single, Boolean) Method

Definition

Dispatch a fling to a nested scrolling parent.

[Android.Runtime.Register("dispatchNestedFling", "(FFZ)Z", "GetDispatchNestedFling_FFZHandler")]
public virtual bool DispatchNestedFling (float velocityX, float velocityY, bool consumed);
[<Android.Runtime.Register("dispatchNestedFling", "(FFZ)Z", "GetDispatchNestedFling_FFZHandler")>]
abstract member DispatchNestedFling : single * single * bool -> bool
override this.DispatchNestedFling : single * single * bool -> bool

Parameters

velocityX
Single

Horizontal fling velocity in pixels per second

velocityY
Single

Vertical fling velocity in pixels per second

consumed
Boolean

true if the child consumed the fling, false otherwise

Returns

true if the nested scrolling parent consumed or otherwise reacted to the fling

Attributes

Remarks

Dispatch a fling to a nested scrolling parent.

This method should be used to indicate that a nested scrolling child has detected suitable conditions for a fling. Generally this means that a touch scroll has ended with a VelocityTracker velocity in the direction of scrolling that meets or exceeds the ViewConfiguration#getScaledMinimumFlingVelocity() minimum fling velocity along a scrollable axis.

If a nested scrolling child view would normally fling but it is at the edge of its own content, it can use this method to delegate the fling to its nested scrolling parent instead. The parent may optionally consume the fling or observe a child fling.

Java documentation for android.view.View.dispatchNestedFling(float, float, boolean).

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