GestureDetector.IOnGestureListener.OnFling Method

Definition

Notified of a fling event when it occurs with the initial on down MotionEvent and the matching up MotionEvent.

[Android.Runtime.Register("onFling", "(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z", "GetOnFling_Landroid_view_MotionEvent_Landroid_view_MotionEvent_FFHandler:Android.Views.GestureDetector/IOnGestureListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnFling (Android.Views.MotionEvent? e1, Android.Views.MotionEvent e2, float velocityX, float velocityY);
[<Android.Runtime.Register("onFling", "(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z", "GetOnFling_Landroid_view_MotionEvent_Landroid_view_MotionEvent_FFHandler:Android.Views.GestureDetector/IOnGestureListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnFling : Android.Views.MotionEvent * Android.Views.MotionEvent * single * single -> bool

Parameters

e1
MotionEvent

The first down motion event that started the fling. A null event indicates an incomplete event stream or error state.

e2
MotionEvent

The move motion event that triggered the current onFling.

velocityX
Single

The velocity of this fling measured in pixels per second along the x axis.

velocityY
Single

The velocity of this fling measured in pixels per second along the y axis.

Returns

true if the event is consumed, else false

Attributes

Remarks

Notified of a fling event when it occurs with the initial on down MotionEvent and the matching up MotionEvent. The calculated velocity is supplied along the x and y axis in pixels per second.

Java documentation for android.view.GestureDetector.OnGestureListener.onFling(android.view.MotionEvent, android.view.MotionEvent, float, float).

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