diff options
author | 2010-10-18 19:45:01 +0900 | |
---|---|---|
committer | 2010-10-19 01:16:07 +0900 | |
commit | b0a6f354aca8f643766719c663297e7be3fc6424 (patch) | |
tree | 47929136d46b4258e305838a3c3faa912dfef757 /java/src/com/android/inputmethod/latin/LatinKeyboard.java | |
parent | 86953d170d3a1c189628a373a5987cfc4c17c997 (diff) | |
download | latinime-b0a6f354aca8f643766719c663297e7be3fc6424.tar.gz latinime-b0a6f354aca8f643766719c663297e7be3fc6424.tar.xz latinime-b0a6f354aca8f643766719c663297e7be3fc6424.zip |
DO NOT MERGE. Add '...' (hint) to period/smiley keys which triggers mini popup by long-press.
bug: 3105185
Change-Id: I901e36aa12dad5968ba1a420fff6a2f2efb16da5
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboard.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboard.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java index d04fc586a..096f3e702 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -61,7 +61,7 @@ public class LatinKeyboard extends Keyboard { private Key mShiftKey; private Key mEnterKey; private Key mF1Key; - private final Drawable mF1HintIcon; + private final Drawable mHintIcon; private Key mSpaceKey; private Key m123Key; private final int NUMBER_HINT_COUNT = 10; @@ -138,7 +138,7 @@ public class LatinKeyboard extends Keyboard { mButtonArrowRightIcon = res.getDrawable(R.drawable.sym_keyboard_language_arrows_right); m123MicIcon = res.getDrawable(R.drawable.sym_keyboard_123_mic); m123MicPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_123_mic); - mF1HintIcon = res.getDrawable(R.drawable.hint_settings); + mHintIcon = res.getDrawable(R.drawable.hint_popup); setDefaultBounds(m123MicPreviewIcon); sSpacebarVerticalCorrection = res.getDimensionPixelOffset( R.dimen.spacebar_vertical_correction); @@ -241,7 +241,7 @@ public class LatinKeyboard extends Keyboard { break; default: if (mode == KeyboardSwitcher.MODE_IM) { - mEnterKey.icon = null; + mEnterKey.icon = mHintIcon; mEnterKey.iconPreview = null; mEnterKey.label = ":-)"; mEnterKey.text = ":-) "; @@ -403,9 +403,9 @@ public class LatinKeyboard extends Keyboard { } private void setMicF1Key(Key key) { - // HACK: draw mMicIcon and mF1HintIcon at the same time + // HACK: draw mMicIcon and mHintIcon at the same time final Drawable micWithSettingsHintDrawable = new BitmapDrawable(mRes, - drawSynthesizedSettingsHintImage(key.width, key.height, mMicIcon, mF1HintIcon)); + drawSynthesizedSettingsHintImage(key.width, key.height, mMicIcon, mHintIcon)); key.label = null; key.codes = new int[] { LatinKeyboardView.KEYCODE_VOICE }; @@ -418,7 +418,7 @@ public class LatinKeyboard extends Keyboard { key.label = label; key.codes = new int[] { label.charAt(0) }; key.popupResId = popupResId; - key.icon = mF1HintIcon; + key.icon = mHintIcon; key.iconPreview = null; } @@ -426,6 +426,10 @@ public class LatinKeyboard extends Keyboard { return key == mF1Key; } + public static boolean hasPuncOrSmileysPopup(Key key) { + return key.popupResId == R.xml.popup_punctuation || key.popupResId == R.xml.popup_smileys; + } + /** * @return a key which should be invalidated. */ |