aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-08 17:07:25 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-12-08 17:48:23 +0900
commit4a734aa21e283b0039a5d460054892a7bad97981 (patch)
tree4ad28cb857f94598b3d4c8dd7b464e521b330130 /java/src
parent9f01ed51d78d9a236d3c321a00ab74165a34630a (diff)
downloadlatinime-4a734aa21e283b0039a5d460054892a7bad97981.tar.gz
latinime-4a734aa21e283b0039a5d460054892a7bad97981.tar.xz
latinime-4a734aa21e283b0039a5d460054892a7bad97981.zip
Fix popup mini keyboard for smiley and .com key
Change-Id: Idd156b14a4a259bc7dcaf498fbc8a121a069cbe9
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 4cce2a0db..e74c968ff 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -202,25 +202,27 @@ public class Key {
this.mX = x + mGap / 2;
this.mY = y;
- mPreviewIcon = style.getDrawable(a, R.styleable.Keyboard_Key_iconPreview);
- Keyboard.setDefaultBounds(mPreviewIcon);
final CharSequence popupCharacters = style.getText(a,
R.styleable.Keyboard_Key_popupCharacters);
final int popupResId = style.getResourceId(a, R.styleable.Keyboard_Key_popupKeyboard, 0);
- // Set popup keyboard resource and characters only when both are specified.
- if (popupResId != 0 && !TextUtils.isEmpty(popupCharacters)) {
- mPopupResId = popupResId;
- mPopupCharacters = popupCharacters;
- } else {
+ // We should not display mini keyboard when both popupResId and popupCharacters are
+ // specified but popupCharacters is empty string.
+ if (popupResId != 0 && popupCharacters != null && popupCharacters.length() == 0) {
mPopupResId = 0;
mPopupCharacters = null;
+ } else {
+ mPopupResId = popupResId;
+ mPopupCharacters = popupCharacters;
}
+
mRepeatable = style.getBoolean(a, R.styleable.Keyboard_Key_isRepeatable, false);
mModifier = style.getBoolean(a, R.styleable.Keyboard_Key_isModifier, false);
mSticky = style.getBoolean(a, R.styleable.Keyboard_Key_isSticky, false);
mEdgeFlags = style.getFlag(a, R.styleable.Keyboard_Key_keyEdgeFlags, 0)
| row.mRowEdgeFlags;
+ mPreviewIcon = style.getDrawable(a, R.styleable.Keyboard_Key_iconPreview);
+ Keyboard.setDefaultBounds(mPreviewIcon);
mIcon = style.getDrawable(a, R.styleable.Keyboard_Key_keyIcon);
Keyboard.setDefaultBounds(mIcon);
mHintIcon = style.getDrawable(a, R.styleable.Keyboard_Key_keyHintIcon);