aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinKeyboard.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-06-21 09:12:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-06-21 09:12:04 -0700
commit20ffde8d830eaf1996e84a886085bc69fdac9105 (patch)
tree215e889e87525250939cd276292859f9e1739aea /java/src/com/android/inputmethod/latin/LatinKeyboard.java
parent3a1a391e98edc8736f58f359e1c226339a5e6169 (diff)
parent52fbad88756a46c4c8142034aa19a13deb1e387b (diff)
downloadlatinime-20ffde8d830eaf1996e84a886085bc69fdac9105.tar.gz
latinime-20ffde8d830eaf1996e84a886085bc69fdac9105.tar.xz
latinime-20ffde8d830eaf1996e84a886085bc69fdac9105.zip
am 52fbad88: Support Turkish keyboard (DO NOT MERGE)
* commit '52fbad88756a46c4c8142034aa19a13deb1e387b': Support Turkish keyboard (DO NOT MERGE)
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboard.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboard.java10
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