am 4280891d: Merge "The bigger touch slop still has a problem"
* commit '4280891dbc2cf60bdf51726e0aa9265ccb64ec88': The bigger touch slop still has a problem
This commit is contained in:
committed by
Android Git Automerger
commit
aff90790df
11
core/java/android/view/GestureDetector.java
Normal file → Executable file
11
core/java/android/view/GestureDetector.java
Normal file → Executable file
@@ -193,8 +193,7 @@ public class GestureDetector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: ViewConfiguration
|
private int mBiggerTouchSlopSquare;
|
||||||
private int mBiggerTouchSlopSquare = 20 * 20;
|
|
||||||
|
|
||||||
private int mTouchSlopSquare;
|
private int mTouchSlopSquare;
|
||||||
private int mDoubleTapSlopSquare;
|
private int mDoubleTapSlopSquare;
|
||||||
@@ -408,6 +407,14 @@ public class GestureDetector {
|
|||||||
}
|
}
|
||||||
mTouchSlopSquare = touchSlop * touchSlop;
|
mTouchSlopSquare = touchSlop * touchSlop;
|
||||||
mDoubleTapSlopSquare = doubleTapSlop * doubleTapSlop;
|
mDoubleTapSlopSquare = doubleTapSlop * doubleTapSlop;
|
||||||
|
|
||||||
|
// The biggerTouchSlop should be a little bit bigger than touchSlop
|
||||||
|
// and mBiggerTouchSlopSquare should not be over mDoubleTapSlopSquare.
|
||||||
|
int biggerTouchSlop = (int)(touchSlop * 1.25f);
|
||||||
|
mBiggerTouchSlopSquare = biggerTouchSlop * biggerTouchSlop;
|
||||||
|
if (mBiggerTouchSlopSquare > mDoubleTapSlopSquare) {
|
||||||
|
mBiggerTouchSlopSquare = mDoubleTapSlopSquare;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user