Skip to content
Permalink
Browse files

bug/#1471 - zoom buttons zoom only when touched but not when finger …

…slides across
  • Loading branch information
pasniak committed Feb 1, 2020
1 parent 00427ba commit 8762b2a5df32e79b89c825b0b33c072648a652af
Showing with 7 additions and 2 deletions.
  1. +7 −2 osmdroid-android/src/main/java/org/osmdroid/views/CustomZoomButtonsDisplay.java
@@ -226,7 +226,12 @@ public boolean isTouchedRotated(final MotionEvent pMotionEvent, final boolean pI
* @since 6.1.3
*/
public boolean isTouched(final MotionEvent pMotionEvent, final boolean pInOrOut) {
return isTouched((int) pMotionEvent.getX(), (int) pMotionEvent.getY(), pInOrOut);
int action = pMotionEvent.getAction();
if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_UP) {
return isTouched((int) pMotionEvent.getX(), (int) pMotionEvent.getY(), pInOrOut);
} else {
return false;
}
}

private boolean isTouched(final int pEventX, final int pEventY, final boolean pInOrOut) {
@@ -238,4 +243,4 @@ private boolean isTouched(final boolean pInOrOut, final boolean pXOrY, final flo
final float topLeft = getTopLeft(pInOrOut, pXOrY);
return pEvent >= topLeft && pEvent <= topLeft + mBitmapSize;
}
}
}

0 comments on commit 8762b2a

Please sign in to comment.
You can’t perform that action at this time.