diff options
author | 2011-07-07 22:02:17 -0700 | |
---|---|---|
committer | 2011-07-07 22:02:17 -0700 | |
commit | bb4be5444b845655c0eb80bcfbb66f93603802ea (patch) | |
tree | 0aa27c9edad98423ad7bd3f1b4d1b6b6aca963f3 /java/src | |
parent | 1bd62a56211db2933eb5dd735c108e610111d6fb (diff) | |
download | latinime-bb4be5444b845655c0eb80bcfbb66f93603802ea.tar.gz latinime-bb4be5444b845655c0eb80bcfbb66f93603802ea.tar.xz latinime-bb4be5444b845655c0eb80bcfbb66f93603802ea.zip |
Override onSizeChanged only on main keyboard view
Bug: 4768084
Change-Id: I555efbd1bf75691a3a2724e9d9c1a9055039aacc
Diffstat (limited to 'java/src')
3 files changed, 11 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index d1345db9d..95b9d7751 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -350,12 +350,6 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy { return a.getFraction(index, 1000, 1000, 1) / 1000.0f; } - @Override - protected void onSizeChanged(int w, int h, int oldw, int oldh) { - // TODO: Should notify InputMethodService instead? - KeyboardSwitcher.getInstance().onSizeChanged(); - } - /** * Attaches a keyboard to this view. The keyboard can be switched at any time and the * view will re-layout itself to accommodate the keyboard. diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java index c8cfb43e3..2dd863e6d 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java @@ -290,6 +290,12 @@ public class LatinKeyboardBaseView extends KeyboardView { return mKeyboardActionListener; } + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + // TODO: Should notify InputMethodService instead? + KeyboardSwitcher.getInstance().onSizeChanged(); + } + /** * Attaches a keyboard to this view. The keyboard can be switched at any time and the * view will re-layout itself to accommodate the keyboard. diff --git a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java index 959427aad..a3d9c0465 100644 --- a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java @@ -58,6 +58,11 @@ public class PopupMiniKeyboardView extends LatinKeyboardBaseView implements Popu } @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + // Do nothing for the mini keyboard. + } + + @Override public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) { // Mini keyboard needs no pop-up key preview displayed, so we pass always false with a // delay of 0. The delay does not matter actually since the popup is not shown anyway. |