diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 9e9e30f3c..43951552e 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -21,4 +21,5 @@
47dip
38dip
+ 2dip
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 2359341c3..5b2095c0e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -22,4 +22,5 @@
54dip
22dip
42dip
+ 4dip
\ No newline at end of file
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);
}