aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2012-12-02 22:49:10 -0800
committerTom Ouyang <ouyang@google.com>2012-12-07 16:34:25 -0800
commitfa2d543785c52f639ad3157c57420f58a199c550 (patch)
treedb90bfc76553bc06dd34ebf7e0fdd6b9c7b7c027 /java/src/com/android/inputmethod/latin/LatinIME.java
parentc1d6374aed994ac68b010e5118f5256d645192c1 (diff)
downloadlatinime-fa2d543785c52f639ad3157c57420f58a199c550.tar.gz
latinime-fa2d543785c52f639ad3157c57420f58a199c550.tar.xz
latinime-fa2d543785c52f639ad3157c57420f58a199c550.zip
Refactor more keys menu framework (part 1)
Eliminate use of slower popup window for rendering the more keys menu and more suggestions menu. These menus are now drawn directly on the preview placer view. Change-Id: I40638724a6ffde2be4b5d0341d2a5db7ff7be930
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 305f38d8c..dcbbfca09 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1064,12 +1064,13 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
final int suggestionsHeight = (mSuggestionsContainer.getVisibility() == View.GONE) ? 0
: mSuggestionsContainer.getHeight();
final int extraHeight = extractHeight + backingHeight + suggestionsHeight;
- int touchY = extraHeight;
+ int visibleTopY = extraHeight;
// Need to set touchable region only if input view is being shown
if (mainKeyboardView.isShown()) {
if (mSuggestionsContainer.getVisibility() == View.VISIBLE) {
- touchY -= suggestionsHeight;
+ visibleTopY -= suggestionsHeight;
}
+ final int touchY = mainKeyboardView.isShowingMoreKeysPanel() ? 0 : visibleTopY;
final int touchWidth = mainKeyboardView.getWidth();
final int touchHeight = mainKeyboardView.getHeight() + extraHeight
// Extend touchable region below the keyboard.
@@ -1077,8 +1078,8 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
outInsets.touchableInsets = InputMethodService.Insets.TOUCHABLE_INSETS_REGION;
outInsets.touchableRegion.set(0, touchY, touchWidth, touchHeight);
}
- outInsets.contentTopInsets = touchY;
- outInsets.visibleTopInsets = touchY;
+ outInsets.contentTopInsets = visibleTopY;
+ outInsets.visibleTopInsets = visibleTopY;
}
@Override