aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-06-04 10:15:50 +0900
committersatok <satok@google.com>2010-06-04 10:25:55 +0900
commit03d88c0b1fe382118d37896b78add3bccfb8d52c (patch)
tree521f093466b40ecbca2c649a06a4246e025e914f /java
parent88327fb73b517e7723ab419cfc4f65ff65126c98 (diff)
downloadlatinime-03d88c0b1fe382118d37896b78add3bccfb8d52c.tar.gz
latinime-03d88c0b1fe382118d37896b78add3bccfb8d52c.tar.xz
latinime-03d88c0b1fe382118d37896b78add3bccfb8d52c.zip
Show a current locale in the space bar
Change-Id: I317a0b0b20c3065f2e7454f7b44654a34b97500d
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboard.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
index 1a9350a83..2dd03389c 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java
@@ -292,9 +292,6 @@ public class LatinKeyboard extends Keyboard {
if (mF1Key != null) {
mF1Key.icon = mMicIcon;
}
- if (mSpaceKey != null) {
- mSpaceKey.icon = mSpaceIcon;
- }
} else {
mShiftLockIcon = mRes.getDrawable(R.drawable.sym_keyboard_shift_locked);
mSpaceIcon = mRes.getDrawable(R.drawable.sym_keyboard_space);
@@ -303,9 +300,10 @@ public class LatinKeyboard extends Keyboard {
if (mF1Key != null) {
mF1Key.icon = mMicIcon;
}
- if (mSpaceKey != null) {
- mSpaceKey.icon = mSpaceIcon;
- }
+ }
+ if (mSpaceKey != null) {
+ mSpaceKey.icon = mSpaceIcon;
+ updateSpaceBarForLocale(f);
}
}
@@ -346,7 +344,7 @@ public class LatinKeyboard extends Keyboard {
}
}
- private void updateSpaceBarForLocale() {
+ private void updateSpaceBarForLocale(boolean isBlack) {
if (mLocale != null) {
// Create the graphic for spacebar
Bitmap buffer = Bitmap.createBitmap(mSpaceKey.width, mSpaceIcon.getIntrinsicHeight(),
@@ -356,7 +354,8 @@ public class LatinKeyboard extends Keyboard {
mSpaceKey.icon = new BitmapDrawable(mRes, buffer);
mSpaceKey.repeatable = mLanguageSwitcher.getLocaleCount() < 2;
} else {
- mSpaceKey.icon = mRes.getDrawable(R.drawable.sym_keyboard_space);
+ mSpaceKey.icon = isBlack ? mRes.getDrawable(R.drawable.sym_bkeyboard_space)
+ : mRes.getDrawable(R.drawable.sym_keyboard_space);
mSpaceKey.repeatable = true;
}
}
@@ -461,7 +460,7 @@ public class LatinKeyboard extends Keyboard {
}
if (mLocale != null && mLocale.equals(locale)) return;
mLocale = locale;
- updateSpaceBarForLocale();
+ updateSpaceBarForLocale(mIsBlackSym);
}
boolean isCurrentlyInSpace() {