GestureDetector.IOnGestureListener.OnScroll Method

Definition

Notified when a scroll occurs with the initial on down MotionEvent and the current move MotionEvent.

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

Parameters

e1
MotionEvent

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

e2
MotionEvent

The move motion event that triggered the current onScroll.

distanceX
Single

The distance along the X axis that has been scrolled since the last call to onScroll. This is NOT the distance between e1 and e2.

distanceY
Single

The distance along the Y axis that has been scrolled since the last call to onScroll. This is NOT the distance between e1 and e2.

Returns

true if the event is consumed, else false

Attributes

Remarks

Notified when a scroll occurs with the initial on down MotionEvent and the current move MotionEvent. The distance in x and y is also supplied for convenience.

Java documentation for android.view.GestureDetector.OnGestureListener.onScroll(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