From 059e67b94b327d1dec5f90d3ce18aa62bee0696b Mon Sep 17 00:00:00 2001 From: Mariusz Saramak Date: Tue, 22 Jan 2019 09:59:22 +0100 Subject: [PATCH] Fix for double image rotation issue https://github.com/Almeros/android-gesture-detectors/issues/5 --- .../android/multitouch/TwoFingerGestureDetector.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/library/src/main/java/com/almeros/android/multitouch/TwoFingerGestureDetector.java b/library/src/main/java/com/almeros/android/multitouch/TwoFingerGestureDetector.java index 0abffbb..42c043f 100644 --- a/library/src/main/java/com/almeros/android/multitouch/TwoFingerGestureDetector.java +++ b/library/src/main/java/com/almeros/android/multitouch/TwoFingerGestureDetector.java @@ -146,11 +146,7 @@ protected void determineFocusPoint(MotionEvent curr) { * @return */ protected static float getRawX(MotionEvent event, int pointerIndex) { - float offset = event.getX() - event.getRawX(); - if(pointerIndex < event.getPointerCount()){ - return event.getX(pointerIndex) + offset; - } - return 0f; + return event.getRawX(); } /** @@ -160,11 +156,7 @@ protected static float getRawX(MotionEvent event, int pointerIndex) { * @return */ protected static float getRawY(MotionEvent event, int pointerIndex) { - float offset = event.getY() - event.getRawY(); - if(pointerIndex < event.getPointerCount()){ - return event.getY(pointerIndex) + offset; - } - return 0f; + return event.getRawY(); } /**