diff options
author | 2014-09-03 10:52:56 +0900 | |
---|---|---|
committer | 2014-09-03 23:37:03 +0900 | |
commit | 1c2cf71921f0f09e39c1df86c1e57d4c607aad34 (patch) | |
tree | b4a57c62993f7f2cb92b79092be0229d08ab9c87 /java/src | |
parent | 5a9c9649db0e31eb8aa6a447dbde49e513933da3 (diff) | |
download | latinime-1c2cf71921f0f09e39c1df86c1e57d4c607aad34.tar.gz latinime-1c2cf71921f0f09e39c1df86c1e57d4c607aad34.tar.xz latinime-1c2cf71921f0f09e39c1df86c1e57d4c607aad34.zip |
Add new value "spacebar" to Key.backgroundType attribute
Bug: 17318036
Change-Id: Ie84438a6aa3adc14a9db603d0cd4d5e37a55d612
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 5b090d924..f7e4d8b10 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -139,6 +139,7 @@ public class Key implements Comparable<Key> { public static final int BACKGROUND_TYPE_STICKY_OFF = 3; public static final int BACKGROUND_TYPE_STICKY_ON = 4; public static final int BACKGROUND_TYPE_ACTION = 5; + public static final int BACKGROUND_TYPE_SPACEBAR = 6; private final int mActionFlags; private static final int ACTION_FLAGS_IS_REPEATABLE = 0x01; @@ -505,6 +506,7 @@ public class Key implements Comparable<Key> { case BACKGROUND_TYPE_STICKY_OFF: return "stickyOff"; case BACKGROUND_TYPE_STICKY_ON: return "stickyOn"; case BACKGROUND_TYPE_ACTION: return "action"; + case BACKGROUND_TYPE_SPACEBAR: return "spacebar"; default: return null; } } @@ -871,6 +873,8 @@ public class Key implements Comparable<Key> { new KeyBackgroundState(android.R.attr.state_checkable, android.R.attr.state_checked), // 5: BACKGROUND_TYPE_ACTION new KeyBackgroundState(android.R.attr.state_active), + // 6: BACKGROUND_TYPE_SPACEBAR + new KeyBackgroundState(), }; } @@ -884,7 +888,7 @@ public class Key implements Comparable<Key> { final Drawable background; if (mBackgroundType == BACKGROUND_TYPE_FUNCTIONAL) { background = functionalKeyBackground; - } else if (getCode() == Constants.CODE_SPACE) { + } else if (mBackgroundType == BACKGROUND_TYPE_SPACEBAR) { background = spacebarBackground; } else { background = keyBackground; |