aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-02-18 11:28:17 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-02-18 14:45:37 +0900
commitaa721c4783616e65a42fb5f234f2b3909ccdd931 (patch)
treeb2c091ee521d134654fc89bbc516a72bde96b779 /java/src
parentb32f1b60554d9e627728bbbb712e85fff547cb8d (diff)
downloadlatinime-aa721c4783616e65a42fb5f234f2b3909ccdd931.tar.gz
latinime-aa721c4783616e65a42fb5f234f2b3909ccdd931.tar.xz
latinime-aa721c4783616e65a42fb5f234f2b3909ccdd931.zip
Add "enabled" as an attribute of Key in Keyboard xml
If the key is marked as "enabled=false", the key will not respond to be pressed. Bug: 3384942 Change-Id: I1ea82d9f3dfa5a9916ff3bbc736ea7e6c77426ae
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 23886ad97..7396f0518 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -95,7 +95,7 @@ public class Key {
public boolean mPressed;
/** If this is a sticky key, is it on? */
public boolean mOn;
- /** Key is enabled or not. */
+ /** Key is enabled and responds on press */
public boolean mEnabled = true;
private final static int[] KEY_STATE_NORMAL_ON = {
@@ -226,6 +226,7 @@ public class Key {
mRepeatable = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isRepeatable, false);
mModifier = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isModifier, false);
mSticky = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isSticky, false);
+ mEnabled = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_enabled, true);
mEdgeFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyEdgeFlags, 0)
| row.mRowEdgeFlags;