From 19e43389268a42156bbdf34acbe37807d8d39ad8 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 10 Jun 2016 12:05:02 +0300 Subject: [PATCH] Better naming. --- .../osmand/plus/views/DoubleTapScaleDetector.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java b/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java index 128a198e4d..83e9121dfc 100644 --- a/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java +++ b/OsmAnd/src/net/osmand/plus/views/DoubleTapScaleDetector.java @@ -27,7 +27,7 @@ public class DoubleTapScaleDetector { private int displayHeightPx; - private boolean isDoubleTapping = false; + private boolean mIsInZoomMode = false; private float scale; private MotionEvent firstDown; private MotionEvent firstUp; @@ -56,9 +56,9 @@ public class DoubleTapScaleDetector { } long currentTime = System.currentTimeMillis(); if (event.getAction() == MotionEvent.ACTION_UP) { - if (isDoubleTapping) { + if (mIsInZoomMode) { secondDown = null; - isDoubleTapping = false; + mIsInZoomMode = false; listener.onZoomEnded(scale); return true; } else { @@ -70,7 +70,7 @@ public class DoubleTapScaleDetector { secondDown = null; } } else { - if (event.getAction() == MotionEvent.ACTION_DOWN && !isDoubleTapping) { + if (event.getAction() == MotionEvent.ACTION_DOWN && !mIsInZoomMode) { if (isConsideredDoubleTap(firstDown, firstUp, event)) { secondDown = MotionEvent.obtain(event); float x = event.getX(); @@ -83,9 +83,9 @@ public class DoubleTapScaleDetector { } } else if (event.getAction() == MotionEvent.ACTION_MOVE) { if (isConfirmedScale(secondDown, event)) { - isDoubleTapping = true; + mIsInZoomMode = true; } - if (isDoubleTapping) { + if (mIsInZoomMode) { float delta = convertPxToDp((int) (firstDown.getY() - event.getY())); float scaleDelta = delta / (displayHeightPx / SCALE_PER_SCREEN); scale = 1 - scaleDelta; @@ -98,7 +98,7 @@ public class DoubleTapScaleDetector { } public boolean isInZoomMode() { - return isDoubleTapping; + return mIsInZoomMode; } private int convertPxToDp(int px) {