diff options
author | 2010-11-30 22:32:14 -0800 | |
---|---|---|
committer | 2010-11-30 22:32:14 -0800 | |
commit | 6f6c90bd296c6d76f0cfa9f8b996aa37dd0ca086 (patch) | |
tree | cb72022a9f9621fc2700072a7fc74ebf26284470 /java/src | |
parent | 4fe3382873507b04c536d043ea3f47b5d3b1296e (diff) | |
parent | 6c13b1a6c7b36d1628cf81ce1afd5efe569ee703 (diff) | |
download | latinime-6f6c90bd296c6d76f0cfa9f8b996aa37dd0ca086.tar.gz latinime-6f6c90bd296c6d76f0cfa9f8b996aa37dd0ca086.tar.xz latinime-6f6c90bd296c6d76f0cfa9f8b996aa37dd0ca086.zip |
am 6c13b1a6: Disable gesture detector on mini-keyboard (DO NOT MERGE)
* commit '6c13b1a6c7b36d1628cf81ce1afd5efe569ee703':
Disable gesture detector on mini-keyboard (DO NOT MERGE)
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index 5a015e93b..b1ef08573 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -226,7 +226,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx protected KeyDetector mKeyDetector = new ProximityKeyDetector(); // Swipe gesture detector - private final GestureDetector mGestureDetector; + private GestureDetector mGestureDetector; private final SwipeTracker mSwipeTracker = new SwipeTracker(); private final int mSwipeThreshold; private final boolean mDisambiguateSwipe; @@ -1106,6 +1106,8 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx }); // Override default ProximityKeyDetector. miniKeyboard.mKeyDetector = new MiniKeyboardKeyDetector(mMiniKeyboardSlideAllowance); + // Remove gesture detector on mini-keyboard + miniKeyboard.mGestureDetector = null; Keyboard keyboard; if (popupKey.popupCharacters != null) { @@ -1307,8 +1309,9 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx // Track the last few movements to look for spurious swipes. mSwipeTracker.addMovement(me); - // We must disable gesture detector while mini-keyboard is on the screen. - if (mMiniKeyboard == null && mGestureDetector.onTouchEvent(me)) { + // Gesture detector must be enabled only when mini-keyboard is not on the screen. + if (mMiniKeyboard == null + && mGestureDetector != null && mGestureDetector.onTouchEvent(me)) { dismissKeyPreview(); mHandler.cancelKeyTimers(); return true; |