diff options
author | 2011-12-17 07:51:43 -0800 | |
---|---|---|
committer | 2011-12-17 07:51:43 -0800 | |
commit | 2bd5cb73b5dab9b450245bf69a60bda1d611a4cc (patch) | |
tree | 4b45dd5ee4823ddf7a1f15b8434a1d541b260cf5 /java/src | |
parent | 32f45ed31c2e8310732476a79119680b0f221f40 (diff) | |
parent | ebec5259b7bc64751a7c9f5f9e6bedff7e20b0dc (diff) | |
download | latinime-2bd5cb73b5dab9b450245bf69a60bda1d611a4cc.tar.gz latinime-2bd5cb73b5dab9b450245bf69a60bda1d611a4cc.tar.xz latinime-2bd5cb73b5dab9b450245bf69a60bda1d611a4cc.zip |
am ebec5259: Get rid of LatinKeyboardParam class
* commit 'ebec5259b7bc64751a7c9f5f9e6bedff7e20b0dc':
Get rid of LatinKeyboardParam class
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/LatinKeyboard.java | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java index dae151833..d34e4108b 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java @@ -77,16 +77,16 @@ public class LatinKeyboard extends Keyboard { private static final String SMALL_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "small"; private static final String MEDIUM_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "medium"; - private LatinKeyboard(Context context, LatinKeyboardParams params) { + private LatinKeyboard(Context context, KeyboardParams params) { super(params); mRes = context.getResources(); mTheme = context.getTheme(); // The index of space key is available only after Keyboard constructor has finished. - mSpaceKey = params.mSpaceKey; + mSpaceKey = getKey(CODE_SPACE); mSpaceIcon = (mSpaceKey != null) ? mSpaceKey.getIcon() : null; - mShortcutKey = params.mShortcutKey; + mShortcutKey = getKey(CODE_SHORTCUT); mEnabledShortcutIcon = (mShortcutKey != null) ? mShortcutKey.getIcon() : null; final int longPressSpaceKeyTimeout = mRes.getInteger(R.integer.config_long_press_space_key_timeout); @@ -105,36 +105,9 @@ public class LatinKeyboard extends Keyboard { a.recycle(); } - private static class LatinKeyboardParams extends KeyboardParams { - Key mSpaceKey = null; - Key mShortcutKey = null; - - LatinKeyboardParams() {} - - @Override - public void onAddKey(Key key) { - super.onAddKey(key); - - switch (key.mCode) { - case Keyboard.CODE_SPACE: - mSpaceKey = key; - break; - case Keyboard.CODE_SHORTCUT: - mShortcutKey = key; - break; - } - } - } - - public static class Builder extends KeyboardBuilder<LatinKeyboardParams> { + public static class Builder extends KeyboardBuilder<KeyboardParams> { public Builder(Context context) { - super(context, new LatinKeyboardParams()); - } - - @Override - public Builder load(int xmlId, KeyboardId id) { - super.load(xmlId, id); - return this; + super(context, new KeyboardParams()); } @Override |