cancel touch events in all layers if multitouch is in use

This commit is contained in:
sonora 2016-12-28 19:39:29 +01:00
parent b3908349a6
commit 624799e58b
2 changed files with 7 additions and 1 deletions

View file

@ -88,7 +88,7 @@ public class MultiTouchSupport {
if(inZoomMode){
listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
inZoomMode = false;
//return true;
return true;
}
return false;
}

View file

@ -862,6 +862,12 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
layers.get(i).onTouchEvent(event, getCurrentRotatedTileBox());
}
gestureDetector.onTouchEvent(event);
} else {
MotionEvent cancelEvent == MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis() + 100, MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0);
for (int i = layers.size() - 1; i >= 0; i--) {
layers.get(i).onTouchEvent(cancelEvent, getCurrentRotatedTileBox());
}
gestureDetector.onTouchEvent(cancelEvent);
}
return true;
}