com.esri.android.map
Class MapGestureDetector
java.lang.Object
com.esri.android.map.MapGestureDetector
public class MapGestureDetector
- extends Object
The MapGestureDetector class is used to detects various gestures and events using the supplied MotionEvent
s.
The MapGestureDetector.OnGestureListener
callback will notify users when a particular motion event has occurred on the MapView.
This class should only be used with MotionEvent
s reported via touch (don't use for trackball) events. To use
this class:
- Create an instance of the
MapGestureDetector
for your MapView
- In the
View.onTouchEvent(MotionEvent)
method you must ensure that you call
onTouchEvent(MotionEvent)
. The methods defined in your callback will be executed when the events occur.
Method Summary |
boolean |
onTouchEvent(android.view.MotionEvent motionevent)
Analyzes the given motion event and, if applicable, it triggers the appropriate callbacks on the. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 contextlistener
- the listener invoked for all the callbacks, this object must not be populated (NOT null).- Since:
- 1.0
onTouchEvent
public boolean onTouchEvent(android.view.MotionEvent motionevent)
- Analyzes the given motion event and, if applicable, it triggers the appropriate callbacks on the.
- Parameters:
motionevent
- The current motion event.
- Returns:
- true if the
MapGestureDetector.OnGestureListener
consumed the event; otherwise false.
MapGestureDetector.OnGestureListener
that is supplied to this method.
Copyright © 2010. All Rights Reserved.