diff options
author | 2009-08-20 18:35:30 -0700 | |
---|---|---|
committer | 2009-08-20 18:35:30 -0700 | |
commit | 6a001f58da80b18bf9c6c4baa1936033f2674710 (patch) | |
tree | e82f252c6fdb5ddcdc6d4d2854b59d8665b81c51 /src | |
parent | ffa3fdd8197b3b3c115d7c779e6bf968bbe06d21 (diff) | |
download | latinime-6a001f58da80b18bf9c6c4baa1936033f2674710.tar.gz latinime-6a001f58da80b18bf9c6c4baa1936033f2674710.tar.xz latinime-6a001f58da80b18bf9c6c4baa1936033f2674710.zip |
Tweak spacebar target area between landscape and portrait.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/inputmethod/latin/LatinKeyboard.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/inputmethod/latin/LatinKeyboard.java b/src/com/android/inputmethod/latin/LatinKeyboard.java index 619a18680..9b04aa264 100644 --- a/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -37,20 +37,23 @@ public class LatinKeyboard extends Keyboard { private static final int SHIFT_LOCKED = 2; private int mShiftState = SHIFT_OFF; - + + static int sSpacebarVerticalCorrection; + public LatinKeyboard(Context context, int xmlLayoutResId) { this(context, xmlLayoutResId, 0); } public LatinKeyboard(Context context, int xmlLayoutResId, int mode) { super(context, xmlLayoutResId, mode); - mShiftLockIcon = context.getResources() - .getDrawable(R.drawable.sym_keyboard_shift_locked); - mShiftLockPreviewIcon = context.getResources() - .getDrawable(R.drawable.sym_keyboard_feedback_shift_locked); + Resources res = context.getResources(); + mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked); + mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked); mShiftLockPreviewIcon.setBounds(0, 0, mShiftLockPreviewIcon.getIntrinsicWidth(), mShiftLockPreviewIcon.getIntrinsicHeight()); + sSpacebarVerticalCorrection = res.getDimensionPixelOffset( + R.dimen.spacebar_vertical_correction); } public LatinKeyboard(Context context, int layoutTemplateResId, @@ -226,7 +229,7 @@ public class LatinKeyboard extends Keyboard { if (code == KEYCODE_SHIFT) x += width / 6; if (code == KEYCODE_DELETE) x -= width / 6; } else if (code == LatinIME.KEYCODE_SPACE) { - y += 5; + y += LatinKeyboard.sSpacebarVerticalCorrection; } return super.isInside(x, y); } |