mark MotionEvent a consumed if leaving pinch zoom
This commit is contained in:
parent
c37c5ff597
commit
e0b957969b
1 changed files with 2 additions and 4 deletions
|
@ -83,17 +83,15 @@ public class MultiTouchSupport {
|
||||||
}
|
}
|
||||||
int actionCode = event.getAction() & ACTION_MASK;
|
int actionCode = event.getAction() & ACTION_MASK;
|
||||||
try {
|
try {
|
||||||
if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_UP || actionCode == MotionEvent.ACTION_CANCEL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Integer pointCount = (Integer) getPointerCount.invoke(event);
|
Integer pointCount = (Integer) getPointerCount.invoke(event);
|
||||||
if(pointCount < 2){
|
if(pointCount < 2){
|
||||||
if(inZoomMode){
|
if(inZoomMode){
|
||||||
listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
|
listener.onZoomOrRotationEnded(zoomRelative, angleRelative);
|
||||||
inZoomMode = false;
|
inZoomMode = false;
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Float x1 = (Float) getX.invoke(event, 0);
|
Float x1 = (Float) getX.invoke(event, 0);
|
||||||
Float x2 = (Float) getX.invoke(event, 1);
|
Float x2 = (Float) getX.invoke(event, 1);
|
||||||
Float y1 = (Float) getY.invoke(event, 0);
|
Float y1 = (Float) getY.invoke(event, 0);
|
||||||
|
|
Loading…
Reference in a new issue