From 87104bace9cb9ed1a700f05a37743a21c2722fff Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 13 Sep 2011 12:50:12 +0900 Subject: [PATCH] Dismiss the more suggestions when the user is sliding down the touch point Bug: 5299142 Change-Id: I466ff41948bbb49fb6874817ecfd94d338238d19 --- .../com/android/inputmethod/latin/SuggestionsView.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/SuggestionsView.java b/java/src/com/android/inputmethod/latin/SuggestionsView.java index 380e73bc0..f00f91107 100644 --- a/java/src/com/android/inputmethod/latin/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/SuggestionsView.java @@ -792,11 +792,10 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, final int translatedY = moreKeysPanel.translateY(y); if (mCheckingIfModalOrSlidingMode) { - final int deltaX = Math.abs(x - mOriginX); - final int deltaY = Math.abs(y - mOriginY); - if (deltaX >= mMoreSuggestionsModalTolerance - || deltaY >= mMoreSuggestionsModalTolerance) { - // Decided to be in the sliding input mode + if (Math.abs(x - mOriginX) >= mMoreSuggestionsModalTolerance + || mOriginY - y >= mMoreSuggestionsModalTolerance) { + // Decided to be in the sliding input mode only when the touch point has been moved + // upward. mCheckingIfModalOrSlidingMode = false; tracker.onShowMoreKeysPanel( translatedX, translatedY, SystemClock.uptimeMillis(), moreKeysPanel);