From 5f70f06a980dcef225e955cdfad8ebb4fa949d72 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 29 Dec 2016 15:09:17 +0100 Subject: [PATCH] also mask onScroll to react on ACTION_MOVE only --- OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index add47c83d1..88e6acd46c 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -1108,7 +1108,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback { @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - dragToAnimate(e2.getX() + distanceX, e2.getY() + distanceY, e2.getX(), e2.getY(), true); + if ((e2.getAction() & 255) == MotionEvent.ACTION_MOVE) { + dragToAnimate(e2.getX() + distanceX, e2.getY() + distanceY, e2.getX(), e2.getY(), true); + } return true; }