aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2010-12-16 16:52:00 +0900
committerKen Wakasa <kwakasa@google.com>2010-12-16 16:53:02 +0900
commit183fbbb0dbf786e10dc3bf17b9377ed6598d4605 (patch)
treea751543784a86782c366896c50189b41c32fa2f6 /java/src
parentdcfbab91e6b2764739042ab13bc21c1679514a01 (diff)
downloadlatinime-183fbbb0dbf786e10dc3bf17b9377ed6598d4605.tar.gz
latinime-183fbbb0dbf786e10dc3bf17b9377ed6598d4605.tar.xz
latinime-183fbbb0dbf786e10dc3bf17b9377ed6598d4605.zip
Revise language string size on spacebar
bug: 3290290 Change-Id: I09694392d7fa447796c56a1f74b5b719ca28e466
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboard.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
index 0a42857ff..7cae4f1df 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
@@ -75,6 +75,9 @@ public class LatinKeyboard extends Keyboard {
private static int sSpacebarVerticalCorrection;
+ private static final String SMALL_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "small";
+ private static final String MEDIUM_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR = "medium";
+
public LatinKeyboard(Context context, KeyboardId id) {
super(context, id);
final Resources res = context.getResources();
@@ -189,10 +192,23 @@ public class LatinKeyboard extends Keyboard {
paint.setAntiAlias(true);
paint.setTextAlign(Align.CENTER);
+ final String textSizeOfLanguageOnSpacebar = res.getString(
+ R.string.config_text_size_of_language_on_spacebar,
+ SMALL_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR);
+ final int textStyle;
+ final int defaultTextSize;
+ if (MEDIUM_TEXT_SIZE_OF_LANGUAGE_ON_SPACEBAR.equals(textSizeOfLanguageOnSpacebar)) {
+ textStyle = android.R.style.TextAppearance_Medium;
+ defaultTextSize = 18;
+ } else {
+ textStyle = android.R.style.TextAppearance_Small;
+ defaultTextSize = 14;
+ }
+
final boolean allowVariableTextSize = true;
final String language = layoutSpaceBar(paint, subtypeSwitcher.getInputLocale(),
mButtonArrowLeftIcon, mButtonArrowRightIcon, width, height,
- getTextSizeFromTheme(android.R.style.TextAppearance_Small, 14),
+ getTextSizeFromTheme(textStyle, defaultTextSize),
allowVariableTextSize);
// Draw language text with shadow