From 179fa2c03e749df736f43e0838200bec52b4808a Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Tue, 12 Oct 2010 16:16:38 +0900 Subject: DO NOT MERGE. Add visual indicator that long press , or mic key will bring up Settings bug:3084022 Change-Id: I8b38e2803eb32469653484701882af35108eb69a --- .../com/android/inputmethod/latin/LatinKeyboardBaseView.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java') 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); } -- cgit v1.2.3-83-g751a