aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-15 17:11:37 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-12-16 16:07:40 +0900
commit98935836f036c7fa42eb063d2030b5dd31c2134f (patch)
tree78e0d61c30b66ddc7f720575756b81f9d1ba1a0d /java/src
parent68b69320242206e4ec9e0bae78282077c74dfed2 (diff)
downloadlatinime-98935836f036c7fa42eb063d2030b5dd31c2134f.tar.gz
latinime-98935836f036c7fa42eb063d2030b5dd31c2134f.tar.xz
latinime-98935836f036c7fa42eb063d2030b5dd31c2134f.zip
Tweak base line of key top letter
Bug: 3285380 Change-Id: Idf6b9b7e000d87df924742634188d193f948130f
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 70267a7ff..4a3a58b94 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -174,7 +174,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// This map caches key label text height in pixel as value and key label text size as map key.
private final HashMap<Integer, Integer> mTextHeightCache = new HashMap<Integer, Integer>();
// Distance from horizontal center of the key, proportional to key label text height and width.
- private final float KEY_LABEL_VERTICAL_ADJUSTMENT_FACTOR_CENTER = 0.55f;
+ private final float KEY_LABEL_VERTICAL_ADJUSTMENT_FACTOR_CENTER = 0.45f;
private final float KEY_LABEL_VERTICAL_PADDING_FACTOR = 1.60f;
private final String KEY_LABEL_REFERENCE_CHAR = "H";
private final int KEY_LABEL_OPTION_ALIGN_LEFT = 1;
@@ -727,6 +727,9 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
final float centerY = (key.mHeight + padding.top - padding.bottom) / 2;
baseline = centerY
+ labelCharHeight * KEY_LABEL_VERTICAL_ADJUSTMENT_FACTOR_CENTER;
+ if (DEBUG_SHOW_ALIGN)
+ drawHorizontalLine(canvas, (int)baseline, key.mWidth, 0xc0008000,
+ new Paint());
}
// Horizontal label text alignment
final int positionX;