@Override protected boolean isSloppyGesture(MotionEvent event){ boolean sloppy = super.isSloppyGesture(event); if (sloppy) return true; // If it's not traditionally sloppy, we check if the angle between fingers // is acceptable. double angle = Math.abs(Math.atan2(mCurrFingerDiffY, mCurrFingerDiffX)); //about 20 degrees, left or right return !(( 0.0f < angle && angle < 0.35f) || 2.79f < angle && angle < Math.PI); }
@Override protected boolean isSloppyGesture(MotionEvent event) { boolean sloppy = super.isSloppyGesture(event); if (sloppy) { return true; } // If it's not traditionally sloppy, we check if the angle between fingers // is acceptable. double angle = Math.abs(Math.atan2(mCurrFingerDiffY, mCurrFingerDiffX)); //about 20 degrees, left or right return !((0.0f < angle && angle < 0.35f) || 2.79f < angle && angle < Math.PI); }