aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2010-12-16 00:50:42 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-16 00:50:42 -0800
commit014f4883c7852ab8c05617a6f3d6c9460f9bc353 (patch)
treeb71ac6ba8574cff5d828cc3be909244deb7214f6 /java/src
parenta8baf5701fdee6221c3c4343b2ce2cd03ce11133 (diff)
parent183fbbb0dbf786e10dc3bf17b9377ed6598d4605 (diff)
downloadlatinime-014f4883c7852ab8c05617a6f3d6c9460f9bc353.tar.gz
latinime-014f4883c7852ab8c05617a6f3d6c9460f9bc353.tar.xz
latinime-014f4883c7852ab8c05617a6f3d6c9460f9bc353.zip
Merge "Revise language string size on spacebar"
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