port lessons learned from 3319 to osmand-core
This commit is contained in:
parent
d9a2223848
commit
daf20a2e5e
1 changed files with 9 additions and 8 deletions
|
@ -40,7 +40,7 @@ public class MultiTouchSupport {
|
||||||
private float scale = 1;
|
private float scale = 1;
|
||||||
private PointF centerPoint = new PointF();
|
private PointF centerPoint = new PointF();
|
||||||
|
|
||||||
private boolean multiTouch;
|
private boolean multiTouch = false;
|
||||||
|
|
||||||
public MultiTouchSupport(Context ctx, MultiTouchZoomListener listener) {
|
public MultiTouchSupport(Context ctx, MultiTouchZoomListener listener) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
|
@ -119,14 +119,15 @@ public class MultiTouchSupport {
|
||||||
listener.onGestureInit(x1, y1, x2, y2);
|
listener.onGestureInit(x1, y1, x2, y2);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case MotionEvent.ACTION_POINTER_UP: {
|
// End only on second-last pointer up, see above
|
||||||
|
//case MotionEvent.ACTION_POINTER_UP: {
|
||||||
|
|
||||||
if (inZoomMode || inTiltMode) {
|
// if (inZoomMode || inTiltMode) {
|
||||||
listener.onGestureFinished(scale, rotation);
|
// listener.onGestureFinished(scale, rotation);
|
||||||
inZoomMode = false;
|
// inZoomMode = false;
|
||||||
inTiltMode = false;
|
// inTiltMode = false;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
}
|
}
|
||||||
case MotionEvent.ACTION_MOVE: {
|
case MotionEvent.ACTION_MOVE: {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue