Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #2805 - add mShoveGestureDetector to the event chain
Browse files Browse the repository at this point in the history
  • Loading branch information
zugaldia authored and bleege committed Dec 3, 2015
1 parent da2dd09 commit 805aae2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,7 @@ public boolean onTouchEvent(@NonNull MotionEvent event) {
// Check two finger gestures first
mRotateGestureDetector.onTouchEvent(event);
mScaleGestureDetector.onTouchEvent(event);
mShoveGestureDetector.onTouchEvent(event);

// Handle two finger tap
switch (event.getActionMasked()) {
Expand All @@ -2501,7 +2502,9 @@ public boolean onTouchEvent(@NonNull MotionEvent event) {
// First pointer up
long tapInterval = event.getEventTime() - event.getDownTime();
boolean isTap = tapInterval <= ViewConfiguration.getTapTimeout();
boolean inProgress = mRotateGestureDetector.isInProgress() || mScaleGestureDetector.isInProgress();
boolean inProgress = mRotateGestureDetector.isInProgress()
|| mScaleGestureDetector.isInProgress()
|| mShoveGestureDetector.isInProgress();

if (mTwoTap && isTap && !inProgress) {
PointF focalPoint = TwoFingerGestureDetector.determineFocalPoint(event);
Expand Down

0 comments on commit 805aae2

Please sign in to comment.