aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinKeyboard.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-11-11 15:28:14 -0800
committerTadashi G. Takaoka <takaoka@google.com>2010-11-12 14:30:25 -0800
commitb0465116bd3786174ccd0034c8a165ebc723b60f (patch)
tree5fb2421d2bb212c7a358f55ee79b4684ccab5751 /java/src/com/android/inputmethod/latin/LatinKeyboard.java
parent8b00bc4f3281c229ee830f34a78c0ec287902c3f (diff)
downloadlatinime-b0465116bd3786174ccd0034c8a165ebc723b60f.tar.gz
latinime-b0465116bd3786174ccd0034c8a165ebc723b60f.tar.xz
latinime-b0465116bd3786174ccd0034c8a165ebc723b60f.zip
Keyboard XML supports switch-case-default tags to select rows and keys
Change-Id: I0d92e513757e765d9de98561205754af5a143650
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboard.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboard.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
index 883069ae6..e1673fb7b 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
@@ -70,7 +70,7 @@ public class LatinKeyboard extends BaseKeyboard {
private LanguageSwitcher mLanguageSwitcher;
private final Resources mRes;
private final Context mContext;
- private int mMode; // TODO: remove this and use the corresponding mode in the parent class
+ private int mMode; // TODO: remove this and use the corresponding mode in the parent class
// Whether this keyboard has voice icon on it
private boolean mHasVoiceButton;
// Whether voice icon is enabled at all
@@ -113,14 +113,12 @@ public class LatinKeyboard extends BaseKeyboard {
private static int sSpacebarVerticalCorrection;
- public LatinKeyboard(Context context, int xmlLayoutResId, int mode, int colorScheme,
- boolean hasSettingsKey, boolean hasVoiceKey, int imeOptions) {
- // TODO: to be used: colorScheme, hasSettingsKey, hasVoiceKey, imeOptions.
- super(context, xmlLayoutResId, mode);
+ public LatinKeyboard(Context context, KeyboardSwitcher.KeyboardId id) {
+ super(context, id);
final Resources res = context.getResources();
mContext = context;
mRes = res;
- mMode = mode;
+ mMode = id.mMode;
mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
setDefaultBounds(mShiftLockPreviewIcon);
@@ -138,6 +136,7 @@ public class LatinKeyboard extends BaseKeyboard {
setDefaultBounds(m123MicPreviewIcon);
sSpacebarVerticalCorrection = res.getDimensionPixelOffset(
R.dimen.spacebar_vertical_correction);
+ final int xmlLayoutResId = id.getXmlId();
mIsAlphaKeyboard = xmlLayoutResId == R.xml.kbd_qwerty
|| xmlLayoutResId == R.xml.kbd_qwerty_black;
mSpaceKeyIndex = indexOf(LatinIME.KEYCODE_SPACE);