aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-09-12 22:27:19 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-12 22:27:19 -0700
commit786f9243aa77209a759cd825985aa8f87bfdbd03 (patch)
tree97a833765d675e7da737cd51a246d70a81122280 /java/src
parentc9e21e82dae217c07421b0e793c3cfc24cf571b3 (diff)
parent244eca3809317ebe3b9a7c4ecc73c04beac2b87e (diff)
downloadlatinime-786f9243aa77209a759cd825985aa8f87bfdbd03.tar.gz
latinime-786f9243aa77209a759cd825985aa8f87bfdbd03.tar.xz
latinime-786f9243aa77209a759cd825985aa8f87bfdbd03.zip
am 244eca38: Merge "Fix emoji keyboard insets"
* commit '244eca3809317ebe3b9a7c4ecc73c04beac2b87e': Fix emoji keyboard insets
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java8
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java5
2 files changed, 10 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index d128d3595..cc1ffd183 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -314,15 +314,19 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
mState.onCodeInput(code, mLatinIME.getCurrentAutoCapsState());
}
+ public boolean isShowingEmojiKeyboard() {
+ return mEmojiKeyboardView.getVisibility() == View.VISIBLE;
+ }
+
public boolean isShowingMoreKeysPanel() {
- if (mEmojiKeyboardView.getVisibility() == View.VISIBLE) {
+ if (isShowingEmojiKeyboard()) {
return false;
}
return mKeyboardView.isShowingMoreKeysPanel();
}
public View getVisibleKeyboardView() {
- if (mEmojiKeyboardView.getVisibility() == View.VISIBLE) {
+ if (isShowingEmojiKeyboard()) {
return mEmojiKeyboardView;
}
return mKeyboardView;
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index cdd6c92e4..5657ed779 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1234,7 +1234,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
int visibleTopY = extraHeight;
// Need to set touchable region only if input view is being shown
if (visibleKeyboardView.isShown()) {
- if (mSuggestionStripView.getVisibility() == View.VISIBLE) {
+ // Note that the height of Emoji layout is the same as the height of the main keyboard
+ // and the suggestion strip
+ if (mKeyboardSwitcher.isShowingEmojiKeyboard()
+ || mSuggestionStripView.getVisibility() == View.VISIBLE) {
visibleTopY -= suggestionsHeight;
}
final int touchY = mKeyboardSwitcher.isShowingMoreKeysPanel() ? 0 : visibleTopY;