From 75c23ced94979a6b3f7c59e95dd46385e9702e2d Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Mon, 20 Sep 2010 18:10:54 +0900 Subject: Add lightweight visual indication for numbers. This change adds lightweight visual hints of alternate numeric characters on the top row - e.g. having a light gray '1' on the upper right corner of letter 'q' Note that MDPI resources are tentative (the same as HDPI for now, until we get fixed MDPI visual assets). bug: 3004632 Change-Id: I7a25cf90b702433a844c88f5c47bf914706af9bc --- java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java') diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index c17d7c555..a45bb21e9 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -24,6 +24,7 @@ import android.inputmethodservice.Keyboard.Key; import android.os.Handler; import android.os.Message; import android.os.SystemClock; +import android.text.TextUtils; import android.util.AttributeSet; import android.view.MotionEvent; @@ -101,7 +102,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { if (keyboard.isShifted() && keyboard instanceof LatinKeyboard && ((LatinKeyboard) keyboard).isAlphaKeyboard() - && label != null && label.length() < 3 + && !TextUtils.isEmpty(label) && label.length() < 3 && Character.isLowerCase(label.charAt(0))) { label = label.toString().toUpperCase(); } -- cgit v1.2.3-83-g751a