From daf20a2e5e64ebaaef47ce3a804770efc224e5a9 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 29 Dec 2016 16:41:39 +0100 Subject: [PATCH] port lessons learned from 3319 to osmand-core --- .../android/sample1/MultiTouchSupport.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MultiTouchSupport.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MultiTouchSupport.java index 8fd22f145e..248ad33039 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MultiTouchSupport.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MultiTouchSupport.java @@ -40,7 +40,7 @@ public class MultiTouchSupport { private float scale = 1; private PointF centerPoint = new PointF(); - private boolean multiTouch; + private boolean multiTouch = false; public MultiTouchSupport(Context ctx, MultiTouchZoomListener listener) { this.ctx = ctx; @@ -119,14 +119,15 @@ public class MultiTouchSupport { listener.onGestureInit(x1, y1, x2, y2); return true; } - case MotionEvent.ACTION_POINTER_UP: { + // End only on second-last pointer up, see above + //case MotionEvent.ACTION_POINTER_UP: { - if (inZoomMode || inTiltMode) { - listener.onGestureFinished(scale, rotation); - inZoomMode = false; - inTiltMode = false; - } - return true; + // if (inZoomMode || inTiltMode) { + // listener.onGestureFinished(scale, rotation); + // inZoomMode = false; + // inTiltMode = false; + // } + // return true; } case MotionEvent.ACTION_MOVE: {