aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2010-10-14 04:28:02 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-14 04:28:02 -0700
commitbf0172d71854bda9a75fb351977eb9d5067eb91e (patch)
tree09a614949bb1bf0a0da4d4dae92f7e457e346df6 /java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
parent96263321b52e1ef1dcba126ae525b7f4abc3c5e9 (diff)
parent179fa2c03e749df736f43e0838200bec52b4808a (diff)
downloadlatinime-bf0172d71854bda9a75fb351977eb9d5067eb91e.tar.gz
latinime-bf0172d71854bda9a75fb351977eb9d5067eb91e.tar.xz
latinime-bf0172d71854bda9a75fb351977eb9d5067eb91e.zip
am 179fa2c0: DO NOT MERGE. Add visual indicator that long press , or mic key will bring up Settings
Merge commit '179fa2c03e749df736f43e0838200bec52b4808a' into gingerbread-plus-aosp * commit '179fa2c03e749df736f43e0838200bec52b4808a': DO NOT MERGE. Add visual indicator that long press , or mic key will bring up Settings
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
index 9ff7b9aef..b3f1364d8 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
@@ -847,7 +847,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
// Usually don't draw icon if label is not null, but we draw icon for the number
// hint.
- shouldDrawIcon = isNumberAtEdgeOfPopupChars(key);
+ shouldDrawIcon = isCommaKeyLabelOrNumberAtEdgeOfPopupChars(key);
}
if (key.icon != null && shouldDrawIcon) {
// Special handing for the upper-right number hint icons
@@ -940,7 +940,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
if (key == null)
return;
// Should not draw number hint icons
- if (key.icon != null && !isNumberAtEdgeOfPopupChars(key)) {
+ if (key.icon != null && !isCommaKeyLabelOrNumberAtEdgeOfPopupChars(key)) {
mPreviewText.setCompoundDrawables(null, null, null,
key.iconPreview != null ? key.iconPreview : key.icon);
mPreviewText.setText(null);
@@ -1221,6 +1221,14 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
return false;
}
+ private static boolean isCommaKeyLabelOrNumberAtEdgeOfPopupChars(Key key) {
+ return isNumberAtEdgeOfPopupChars(key) || isCommaKeyLabel(key);
+ }
+
+ private static boolean isCommaKeyLabel(Key key) {
+ return ",".equals(key.label);
+ }
+
private static boolean isNumberAtEdgeOfPopupChars(Key key) {
return isNumberAtLeftmostPopupChar(key) || isNumberAtRightmostPopupChar(key);
}