Merge "Override onSizeChanged only on main keyboard view"

main
Tadashi G. Takaoka 2011-07-07 22:33:44 -07:00 committed by Android (Google) Code Review
commit 48f989dee5
3 changed files with 11 additions and 6 deletions

View File

@ -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.

View File

@ -292,6 +292,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.

View File

@ -57,6 +57,11 @@ public class PopupMiniKeyboardView extends LatinKeyboardBaseView implements Popu
setKeyPreviewPopupEnabled(false, 0);
}
@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