Android Guides | Samples

Android.Views.GestureDetector Class

Detects various gestures and events using the supplied MotionEvents.

See Also: GestureDetector

Syntax

[Android.Runtime.Register("android/view/GestureDetector", DoNotGenerateAcw=true)]
public class GestureDetector : Object

Remarks

Detects various gestures and events using the supplied MotionEvents. The NoType:android/view/GestureDetector$OnGestureListener;Href=../../../reference/android/view/GestureDetector.OnGestureListener.html callback will notify users when a particular motion event has occurred. This class should only be used with MotionEvents reported via touch (don't use for trackball events). To use this class:

[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

The members of Android.Views.GestureDetector are listed below.

See Also: Object

Public Constructors

Creates a GestureDetector with the supplied listener.
Creates a GestureDetector with the supplied listener.
Creates a GestureDetector with the supplied listener.
Creates a GestureDetector with the supplied listener that runs deferred events on the thread associated with the supplied Handler.
Creates a GestureDetector with the supplied listener that runs deferred events on the thread associated with the supplied Handler.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

OnTouchEvent(MotionEvent) : Boolean
Analyzes the given motion event and if applicable triggers the appropriate callbacks on the NoType:android/view/GestureDetector$OnGestureListener;Href=../../../reference/android/view/GestureDetector.OnGestureListener.html supplied.
SetOnDoubleTapListener(GestureDetector+IOnDoubleTapListener)
Sets the listener which will be called for double-tap and related gestures.

Public Events