@Override
	public boolean onTouchEvent(MotionEvent event) {

		switch (event.getAction() & MotionEvent.ACTION_MASK) {
		case MotionEvent.ACTION_DOWN:
			if (event.getPointerCount() == 1) {
				touchMode = TOUCH_MODE_SINGLE;
			}
			break;
		case MotionEvent.ACTION_UP:
			touchMode = TOUCH_MODE_NONE;
			break;
		case MotionEvent.ACTION_POINTER_UP:
			touchMode = TOUCH_MODE_NONE;
			break;
		case MotionEvent.ACTION_POINTER_DOWN:
			olddistance = calcDistance(event);
			if (olddistance > MIN_DISTANCE) {
				touchMode = TOUCH_MODE_MULTI;
			}
			return true;
			//break;
		case MotionEvent.ACTION_MOVE:
			if (touchMode == TOUCH_MODE_MULTI) {
				newdistance = calcDistance(event);
				if (newdistance > MIN_DISTANCE
						&& Math.abs(newdistance - olddistance) > MIN_DISTANCE) {
					if (onZoomGestureListener != null) {
						if (newdistance > olddistance) {
							onZoomGestureListener.onZoomIn((IZoomable)instance,event);
						} else {
							onZoomGestureListener.onZoomOut((IZoomable)instance,event);
						}
					}
					olddistance = newdistance;
				}
				
				return true;
			}
			break;
		}
		return super.onTouchEvent(event);
	}
<p>en</p>
<p>jp</p>
<p>cn</p>

@author limc 
@version v1.0 2014/06/20 17:33:01
src/src/cn/limc/androidcharts/event/ZoomGestureDetector.java