com.esri.android.map
Interface MapGestureDetector.OnGestureListener

All Known Implementing Classes:
MapOnTouchListener
Enclosing class:
MapGestureDetector

public static interface MapGestureDetector.OnGestureListener

The listener that is used to notify when gestures occur. If you want to listen for all the different gestures then implement this interface.


Method Summary
 boolean onDoubleTap(android.view.MotionEvent point)
          Notified when a single-pointer-double-tap gesture occurs.
 boolean onDragPointerMove(android.view.MotionEvent from, android.view.MotionEvent to)
          Notified when a part of a single touch drag gesture event occurs.
 boolean onDragPointerUp(android.view.MotionEvent from, android.view.MotionEvent to)
          Notified when a part of a single-touch-drag gesture event occurs.
 void onLongPress(android.view.MotionEvent point)
          Notified when a long-press gesture occurs.
 void onMultiPointersSingleTap(android.view.MotionEvent event)
          Notified when a two-pointers-single-tap gesture occurs.
 boolean onPinchPointersDown(android.view.MotionEvent event)
          Notified when a part of a pinch gesture occurs.
 boolean onPinchPointersMove(android.view.MotionEvent event)
          Notified when a part of a pinch gesture occurs.
 boolean onPinchPointersUp(android.view.MotionEvent event)
          Notified when a part of a pinch gesture occurs.
 boolean onSingleTap(android.view.MotionEvent point)
          Notified when a single-pointer-double-tap gesture occurs.
 

Method Detail

onDragPointerMove

boolean onDragPointerMove(android.view.MotionEvent from,
                          android.view.MotionEvent to)
Notified when a part of a single touch drag gesture event occurs. The touch pointer is moving from the "from" point to the "to" point.

Parameters:
from - The MotionEvent object containing full information about the "from" point.
to - The MotionEvent object containing full information about the "to" point.
Returns:
True if the listener has consumed the event, false otherwise.
See Also:
onDragPointerUp(MotionEvent, MotionEvent)

onDragPointerUp

boolean onDragPointerUp(android.view.MotionEvent from,
                        android.view.MotionEvent to)
Notified when a part of a single-touch-drag gesture event occurs. The drag gesture has finished. The motion events contain the final movement of the gesture.

Parameters:
from - The MotionEvent object containing full information about the "from" point.
to - The MotionEvent object containing full information about the "to" point.
Returns:
True if the listener has consumed the event, false otherwise.
See Also:
onDragPointerMove(MotionEvent, MotionEvent)

onPinchPointersDown

boolean onPinchPointersDown(android.view.MotionEvent event)
Notified when a part of a pinch gesture occurs. The gesture has started as a two pointers down motion.

Returns:
True if the listener has consumed the event, false otherwise.
See Also:
onPinchPointersMove(MotionEvent), onPinchPointersUp(MotionEvent)

onPinchPointersMove

boolean onPinchPointersMove(android.view.MotionEvent event)
Notified when a part of a pinch gesture occurs. The two pointers of the gesture have moved. To get the move pointers you can:

float x1 = event.getX(0), y1 = event.getY(0), x2 = event.getX(1), y2 = event.getY(1);

Returns:
True if the listener has consumed the event, false otherwise.
See Also:
onPinchPointersDown(MotionEvent), onPinchPointersUp(MotionEvent)

onPinchPointersUp

boolean onPinchPointersUp(android.view.MotionEvent event)
Notified when a part of a pinch gesture occurs. The pinch gesture has finished. The motion event contains the final movement of the gesture.

Returns:
True if the listener has consumed the event, false otherwise.
See Also:
onPinchPointersDown(MotionEvent), onPinchPointersMove(MotionEvent)

onDoubleTap

boolean onDoubleTap(android.view.MotionEvent point)
Notified when a single-pointer-double-tap gesture occurs. The motion event contains the final movement of the gesture.

Returns:
True if the listener has consumed the event, false otherwise.

onMultiPointersSingleTap

void onMultiPointersSingleTap(android.view.MotionEvent event)
Notified when a two-pointers-single-tap gesture occurs. The motion event contains the final movement of the gesture.


onLongPress

void onLongPress(android.view.MotionEvent point)
Notified when a long-press gesture occurs. The motion event contains the initial movement of the gesture.

Parameters:
point - The initial on down motion event that started the longpress.

onSingleTap

boolean onSingleTap(android.view.MotionEvent point)
Notified when a single-pointer-double-tap gesture occurs. The motion event contains the initial movement of the gesture.

Returns:
True if the listener has consumed the event, false otherwise.


Copyright © 2012. All Rights Reserved.