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

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.