Beispiel #1
0
  public boolean onShove(ShoveGestureDetector detector) {

    if (mScaleHandled || mRotationHandled) return false;

    mShoveHandled = true;

    float currentSpanX = detector.getCurrentSpanX();
    float prevSpanX = detector.getPreviousSpanX();

    double diffX = Math.abs(currentSpanX - prevSpanX);
    mLastDoubleGestureTime = detector.getEventTime();
    handleShoveGesture(detector.getShovePixelsDelta() / displayMetrics.heightPixels);
    return true;
  }
Beispiel #2
0
  public boolean onTouch(View v, MotionEvent event) {

    if (genericMotionListener != null) {
      genericMotionListener.onGenericMotion(v, event);
    }

    gestureDetector.onTouchEvent(event);
    scaleGestureDetector.onTouchEvent(event);
    shoveGestureDetector.onTouchEvent(event);
    rotateGestureDetector.onTouchEvent(event);

    return true;
  }