diff options
author | Antonio Zugaldia <antonio@mapbox.com> | 2015-12-03 14:36:23 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-12-03 16:57:43 -0600 |
commit | a4f10ef2c3cbad75c40cf6136b7ec9bf0c150125 (patch) | |
tree | e3d47d7c4dda3fe394b1f37561124dc861d033b8 /android/MapboxGLAndroidSDK/src | |
parent | 4dd84b3d92f4ff9e7f06b77c20ca83e2a681212e (diff) | |
download | qtlocation-mapboxgl-a4f10ef2c3cbad75c40cf6136b7ec9bf0c150125.tar.gz |
[android] #2805 - Placeholder for a ShoveGestureListener
Diffstat (limited to 'android/MapboxGLAndroidSDK/src')
-rw-r--r-- | android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java index 9b09d999df..71da8c38fb 100644 --- a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java +++ b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java @@ -53,6 +53,7 @@ import android.widget.ImageView; import android.widget.ZoomButtonsController; import com.almeros.android.multitouch.gesturedetectors.RotateGestureDetector; +import com.almeros.android.multitouch.gesturedetectors.ShoveGestureDetector; import com.almeros.android.multitouch.gesturedetectors.TwoFingerGestureDetector; import com.mapbox.mapboxsdk.R; import com.mapbox.mapboxsdk.annotations.Annotation; @@ -180,6 +181,7 @@ public final class MapView extends FrameLayout { private GestureDetectorCompat mGestureDetector; private ScaleGestureDetector mScaleGestureDetector; private RotateGestureDetector mRotateGestureDetector; + private ShoveGestureDetector mShoveGestureDetector; private boolean mTwoTap = false; private boolean mZoomStarted = false; private boolean mQuickZoom = false; @@ -682,6 +684,7 @@ public final class MapView extends FrameLayout { mScaleGestureDetector = new ScaleGestureDetector(context, new ScaleGestureListener()); ScaleGestureDetectorCompat.setQuickScaleEnabled(mScaleGestureDetector, true); mRotateGestureDetector = new RotateGestureDetector(context, new RotateGestureListener()); + mShoveGestureDetector = new ShoveGestureDetector(context, new ShoveGestureListener()); // Shows the zoom controls if (!context.getPackageManager() @@ -2833,6 +2836,26 @@ public final class MapView extends FrameLayout { } } + // This class handles a vertical two-finger shove. (If you place two fingers on screen with + // less than a 20 degree angle between them, this will detect movement on the Y-axis.) + private class ShoveGestureListener implements ShoveGestureDetector.OnShoveGestureListener { + + @Override + public boolean onShove(ShoveGestureDetector detector) { + return false; + } + + @Override + public boolean onShoveBegin(ShoveGestureDetector detector) { + return false; + } + + @Override + public void onShoveEnd(ShoveGestureDetector detector) { + + } + } + // This class handles input events from the zoom control buttons // Zoom controls allow single touch only devices to zoom in and out private class OnZoomListener implements ZoomButtonsController.OnZoomListener { |