aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-09-06 06:49:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-06 06:49:01 -0700
commit623818a8dbeb811df876e7776692fcfc3fe1472b (patch)
treeea9c93bc84218ad23b3989491542ec7f72c6864f /java/src
parent920c507cd305e388b79b795801b22f5d022bb963 (diff)
parent7bbea0dd8fe04b378a9a7a161c2995998f4a8dcf (diff)
downloadlatinime-623818a8dbeb811df876e7776692fcfc3fe1472b.tar.gz
latinime-623818a8dbeb811df876e7776692fcfc3fe1472b.tar.xz
latinime-623818a8dbeb811df876e7776692fcfc3fe1472b.zip
am 7bbea0dd: am 8d7ffcb2: Disable pop-up preview on mini keyboard
Merge commit '7bbea0dd8fe04b378a9a7a161c2995998f4a8dcf' * commit '7bbea0dd8fe04b378a9a7a161c2995998f4a8dcf': Disable pop-up preview on mini keyboard
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java3
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardView.java18
2 files changed, 2 insertions, 19 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
index 51bdc2c0c..1e95e8ac4 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java
@@ -1073,7 +1073,8 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx
mMiniKeyboardOriginY = y + container.getPaddingTop();
mMiniKeyboard.setPopupOffset((x < 0) ? 0 : x, y);
mMiniKeyboard.setShifted(isShifted());
- mMiniKeyboard.setPreviewEnabled(isPreviewEnabled());
+ // Mini keyboard needs no pop-up key preview displayed.
+ mMiniKeyboard.setPreviewEnabled(false);
mMiniKeyboardPopup.setContentView(container);
mMiniKeyboardPopup.setWidth(container.getMeasuredWidth());
mMiniKeyboardPopup.setHeight(container.getMeasuredHeight());
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
index 4295427e3..8f20a22d0 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
@@ -78,17 +78,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
setKeyboardLocal(k);
}
- private static boolean hasOneDigitAlternate(Key key) {
- final CharSequence alternates = key.popupCharacters;
- if (alternates == null)
- return false;
- final String altChars = alternates.toString();
- if (altChars.codePointCount(0, altChars.length()) != 1)
- return false;
- final int altCode = altChars.codePointAt(0);
- return altCode >= '0' && altCode <= '9';
- }
-
@Override
protected boolean onLongPress(Key key) {
int primaryCode = key.codes[0];
@@ -104,13 +93,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
return true;
- } else if (hasOneDigitAlternate(key)) {
- mKeyCodes[0] = primaryCode = key.popupCharacters.charAt(0);
- // when there is only one alternate character, send it as key action.
- getOnKeyboardActionListener().onKey(primaryCode, mKeyCodes,
- LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
- LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
- return true;
} else {
return super.onLongPress(key);
}