aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BaseKeyboard.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-11-13 00:16:34 -0800
committerTadashi G. Takaoka <takaoka@google.com>2010-11-16 13:45:49 -0800
commit10227a71a047706a2290ff0b57f3437d5add7b35 (patch)
tree797d975d605282b91447e278f615051d44867cff /java/src/com/android/inputmethod/latin/BaseKeyboard.java
parentc1e2e827b5d1bba59eb99d322dc101657ec28768 (diff)
downloadlatinime-10227a71a047706a2290ff0b57f3437d5add7b35.tar.gz
latinime-10227a71a047706a2290ff0b57f3437d5add7b35.tar.xz
latinime-10227a71a047706a2290ff0b57f3437d5add7b35.zip
Implement temporary upper case hint icon
This change partially implements the requested feature. The following are not supported yet. - Non-letter key handling on automatic temporary upper case layout. - Non-letter key handling on shift chording in caps lock layout. - Hint icons for manual temporary upper case layout are not final ones. Bug: 3193390 Change-Id: I636da99d1be05b1337935d87c6f4d140661e1cc8
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BaseKeyboard.java')
-rw-r--r--java/src/com/android/inputmethod/latin/BaseKeyboard.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/BaseKeyboard.java b/java/src/com/android/inputmethod/latin/BaseKeyboard.java
index be0a6a28a..0f8b75d45 100644
--- a/java/src/com/android/inputmethod/latin/BaseKeyboard.java
+++ b/java/src/com/android/inputmethod/latin/BaseKeyboard.java
@@ -178,17 +178,23 @@ public class BaseKeyboard {
* being the most important.
*/
public int[] codes;
+ /** The unicode that this key generates in manual temporary upper case mode. */
+ public int manualTemporaryUpperCaseCode;
/** Label to display */
public CharSequence label;
- /** Label to display when keyboard is in temporary shift mode */
- public CharSequence temporaryShiftLabel;
/** Icon to display instead of a label. Icon takes precedence over a label */
public Drawable icon;
/** Hint icon to display on the key in conjunction with the label */
public Drawable hintIcon;
/** Preview version of the icon, for the preview popup */
+ /**
+ * The hint icon to display on the key when keyboard is in manual temporary upper case
+ * mode.
+ */
+ public Drawable manualTemporaryUpperCaseHintIcon;
+
public Drawable iconPreview;
/** Width of the key, not including the gap */
public int width;
@@ -320,9 +326,13 @@ public class BaseKeyboard {
setDefaultBounds(icon);
hintIcon = a.getDrawable(R.styleable.BaseKeyboard_Key_keyHintIcon);
setDefaultBounds(hintIcon);
+ manualTemporaryUpperCaseHintIcon = a.getDrawable(
+ R.styleable.BaseKeyboard_Key_manualTemporaryUpperCaseHintIcon);
+ setDefaultBounds(manualTemporaryUpperCaseHintIcon);
label = a.getText(R.styleable.BaseKeyboard_Key_keyLabel);
- temporaryShiftLabel = a.getText(R.styleable.BaseKeyboard_Key_temporaryShiftKeyLabel);
+ manualTemporaryUpperCaseCode = a.getInt(
+ R.styleable.BaseKeyboard_Key_manualTemporaryUpperCaseCode, 0);
text = a.getText(R.styleable.BaseKeyboard_Key_keyOutputText);
if (codes == null && !TextUtils.isEmpty(label)) {