diff options
author | 2011-06-21 18:03:18 +0900 | |
---|---|---|
committer | 2011-06-21 10:42:53 -0700 | |
commit | ec622ced359cfe646efc14b68e25539fa7a438d9 (patch) | |
tree | 6d582ddc027c722ba7dc6276b33bcab94e057c77 /java/src/com/android/inputmethod/latin/LatinKeyboard.java | |
parent | e5e9bc0e4f43195ef03268565cbd68cdd18e5e2d (diff) | |
download | latinime-ec622ced359cfe646efc14b68e25539fa7a438d9.tar.gz latinime-ec622ced359cfe646efc14b68e25539fa7a438d9.tar.xz latinime-ec622ced359cfe646efc14b68e25539fa7a438d9.zip |
Support Turkish keyboard (DO NOT MERGE)
Basically this change is back port from Master I1ae2c4ff.
Bug: 4435347
Change-Id: Ide1a46bbf5584d8783bb93bbe64328f514c6ab79
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboard.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboard.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java index fbba55bad..1438d7da1 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -513,7 +513,7 @@ public class LatinKeyboard extends Keyboard { final Rect bounds = new Rect(); // Estimate appropriate language name text size to fit in maxTextWidth. - String language = LanguageSwitcher.toTitleCase(locale.getDisplayLanguage(locale)); + String language = LanguageSwitcher.toTitleCase(locale.getDisplayLanguage(locale), locale); int textWidth = getTextWidth(paint, language, origTextSize, bounds); // Assuming text width and text size are proportional to each other. float textSize = origTextSize * Math.min(maxTextWidth / textWidth, 1.0f); @@ -529,7 +529,7 @@ public class LatinKeyboard extends Keyboard { textSize = origTextSize; } if (useShortName) { - language = LanguageSwitcher.toTitleCase(locale.getLanguage()); + language = LanguageSwitcher.toTitleCase(locale.getLanguage(), locale); textWidth = getTextWidth(paint, language, origTextSize, bounds); textSize = origTextSize * Math.min(maxTextWidth / textWidth, 1.0f); } @@ -646,6 +646,10 @@ public class LatinKeyboard extends Keyboard { setColorOfSymbolIcons(isAutoCompletion, isBlackSym); } + public Locale getInputLocale() { + return (mLocale != null) ? mLocale : mLanguageSwitcher.getSystemLocale(); + } + boolean isCurrentlyInSpace() { return mCurrentlyInSpace; } @@ -955,7 +959,7 @@ public class LatinKeyboard extends Keyboard { } private String getLanguageName(Locale locale) { - return LanguageSwitcher.toTitleCase(locale.getDisplayLanguage(locale)); + return LanguageSwitcher.toTitleCase(locale.getDisplayLanguage(locale), locale); } @Override |