com.esri.android.map
Class MapGestureDetector

java.lang.Object
  extended by com.esri.android.map.MapGestureDetector

public class MapGestureDetector
extends Object

The MapGestureDetector class is used to detects various gestures and events using the supplied MotionEvents. The MapGestureDetector.OnGestureListener callback will notify users when a particular motion event has occurred on the MapView. This class should only be used with MotionEvents reported via touch (don't use for trackball) events. To use this class:


Nested Class Summary
static interface MapGestureDetector.OnGestureListener
          The listener that is used to notify when gestures occur.
 
Constructor Summary
MapGestureDetector(android.content.Context context, MapGestureDetector.OnGestureListener listener)
          Creates a MapGestureDetector with the supplied listener.
 
Method Summary
 boolean onTouchEvent(android.view.MotionEvent motionevent)
          Analyzes the given motion event and, if applicable, it triggers the appropriate callbacks on the MapGestureDetector.OnGestureListener that is supplied to this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapGestureDetector

public MapGestureDetector(android.content.Context context,
                          MapGestureDetector.OnGestureListener listener)
Creates a MapGestureDetector with the supplied listener. You may only use this constructor from a UI thread (this is usually the case).

Parameters:
context - the application's context
listener - the listener invoked for all the callbacks, this object must not be populated (NOT null).
Method Detail

onTouchEvent

public boolean onTouchEvent(android.view.MotionEvent motionevent)
Analyzes the given motion event and, if applicable, it triggers the appropriate callbacks on the MapGestureDetector.OnGestureListener that is supplied to this method.

Parameters:
motionevent - The current motion event.
Returns:
true if the MapGestureDetector.OnGestureListener consumed the event; otherwise false.


Copyright © 2012. All Rights Reserved.