aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-16 00:22:23 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-16 00:22:23 -0800
commita8baf5701fdee6221c3c4343b2ce2cd03ce11133 (patch)
treefa432782ffb5cddb3973043e1c286f7251a9ee71 /java/src
parent24e1f28f2527d72d03c6cf6f3b75acbee52a3eb8 (diff)
parent98935836f036c7fa42eb063d2030b5dd31c2134f (diff)
downloadlatinime-a8baf5701fdee6221c3c4343b2ce2cd03ce11133.tar.gz
latinime-a8baf5701fdee6221c3c4343b2ce2cd03ce11133.tar.xz
latinime-a8baf5701fdee6221c3c4343b2ce2cd03ce11133.zip
Merge "Tweak base line of key top letter"
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;