HERE Android SDK Developer's Guide

OnGestureListener

The interface OnGestureListener is a member of com.here.android.mpa.streetlevel.StreetLevelGesture.

Interface Summary

public static abstract interface StreetLevelGesture.OnGestureListener

Event Listener interface for gesture events.

[For complete information, see the section Interface Details]

Nested Class Summary

Table 1. Nested Classes in OnGestureListener
Nested Classes

public static abstract class StreetLevelGesture.OnGestureListener.OnGestureListenerAdapter

Default implementation for the OnGestureListener interface.

Method Summary

Table 2. Methods in OnGestureListener
Methods

public abstract boolean onCompassSelected ()

A callback indicating that the compass within the StreetLevelFragment has been selected.

public abstract boolean onDoubleTap (PointF p)

A callback indicating the detection of a double tap user gesture within the StreetLevelFragment.

public abstract boolean onObjectsSelected (java.util.List <StreetLevelSelectedObject> selectedObjects)

A callback indicating that one or more objects within the StreetLevelFragment has been selected.

public abstract boolean onPinchZoom (float scaleFactor)

A callback indicating the detection of a pinch-to-zoom user gesture within the StreetLevelFragment.

public abstract boolean onRotate (PointF from, PointF to)

A callback indicating the detection of a rotation or tilt user gesture within the StreetLevelFragment.

public abstract boolean onTap (PointF p)

A callback indicating the detection of a tap user gesture within the StreetLevelFragment.

Interface Details

Event Listener interface for gesture events. Please use StreetLevelGesture.OnGestureListener if all events are necessary and StreetLevelGesture.OnGestureListener.OnGestureListenerAdapter if some events are required. This interface can be added via StreetLevelGesture.addOnGestureListener(OnGestureListener) and removed via StreetLevelGesture.removeOnGestureListener(OnGestureListener). Please see StreetLevelGesture for a full set of configurable APIs.

Method Details

public abstract boolean onCompassSelected ()

A callback indicating that the compass within the StreetLevelFragment has been selected.

Returns:

True if the selection has been consumed (which prevents the default StreetLevelFragment compass selection behavior), false otherwise

public abstract boolean onDoubleTap (PointF p)

A callback indicating the detection of a double tap user gesture within the StreetLevelFragment.

Parameters:

  • p

    A PointF representing the on-screen point of the double-tap gesture

Returns:

True if the tap has been consumed (which prevents the default StreetLevelFragment double tap behavior), false otherwise

public abstract boolean onObjectsSelected (java.util.List <StreetLevelSelectedObject> selectedObjects)

A callback indicating that one or more objects within the StreetLevelFragment has been selected.

Parameters:

Returns:

True if the selection has been consumed (which prevents the default StreetLevelFragment object selection behavior), false otherwise

public abstract boolean onPinchZoom (float scaleFactor)

A callback indicating the detection of a pinch-to-zoom user gesture within the StreetLevelFragment.

Parameters:

  • scaleFactor

    A scale factor relative to the points of the two simultaneous touches at separate screen coordinates

Returns:

True if consumed (which prevents the default StreetLevelFragment zoom-in or zoom-out behavior), false otherwise

public abstract boolean onRotate (PointF from, PointF to)

A callback indicating the detection of a rotation or tilt user gesture within the StreetLevelFragment.

Parameters:

  • from

    A android.graphics.PointF representing the on-screen point where the user first touched the screen

  • to

    A android.graphics.PointF representing the on-screen point where the user removed their finger from the screen

Returns:

True if consumed (which prevents the default StreetLevelFragment rotate-to-here behavior), false otherwise

public abstract boolean onTap (PointF p)

A callback indicating the detection of a tap user gesture within the StreetLevelFragment.

Parameters:

  • p

    The point coordinate of the tap

Returns:

True if the tap has been consumed (which prevents the default StreetLevelFragment tap behavior), false otherwise