@Override
public boolean onTouchEvent(MotionEvent event) {
boolean res = mScaleGestureDetector.onTouchEvent(event);
if (!mScaleGestureDetector.isInProgress()) {
res = mGestureDetector.onTouchEvent(event);
}
return res;
}
类:SimpleOnScaleGestureListener、SimpleOnGestureListener
接口:OnScaleGestureListener、OnGestureListener
也可以使用:event.getPointerCount()判断几只手指触摸