diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2012-02-29 22:21:57 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2012-03-02 20:52:25 +0900 |
| commit | 5ef4fccbb90491e1f6c2e87b47ebf9f3659949fb (patch) | |
| tree | fe7ae0e9f7b8a3b6a5b9a9c1566aa51c9440a65c /java/src/com/android/inputmethod/keyboard/Key.java | |
| parent | 961703841e89a274122c87541d1151fd91672ddc (diff) | |
Support dividers in MoreKeysKeyboard
Bug: 6080806
Change-Id: Iacd78c6aab6abf948717d34da7489a79c41316d2
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/Key.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index f1611d9ee..a719b4aa7 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -108,9 +108,11 @@ public class Key { private static final int MORE_KEYS_COLUMN_MASK = 0x000000ff; private static final int MORE_KEYS_FLAGS_FIXED_COLUMN_ORDER = 0x80000000; private static final int MORE_KEYS_FLAGS_HAS_LABELS = 0x40000000; + private static final int MORE_KEYS_FLAGS_NEEDS_DIVIDERS = 0x40000000; private static final String MORE_KEYS_AUTO_COLUMN_ORDER = "!autoColumnOrder!"; private static final String MORE_KEYS_FIXED_COLUMN_ORDER = "!fixedColumnOrder!"; private static final String MORE_KEYS_HAS_LABELS = "!hasLabels!"; + private static final String MORE_KEYS_NEEDS_DIVIDERS = "!needsDividers!"; /** Background type that represents different key background visual than normal one. */ public final int mBackgroundType; @@ -253,6 +255,9 @@ public class Key { if (KeySpecParser.getBooleanValue(moreKeys, MORE_KEYS_HAS_LABELS)) { moreKeysColumn |= MORE_KEYS_FLAGS_HAS_LABELS; } + if (KeySpecParser.getBooleanValue(moreKeys, MORE_KEYS_NEEDS_DIVIDERS)) { + moreKeysColumn |= MORE_KEYS_FLAGS_NEEDS_DIVIDERS; + } mMoreKeysColumnAndFlags = moreKeysColumn; final String[] additionalMoreKeys = style.getStringArray( @@ -539,6 +544,10 @@ public class Key { return (mMoreKeysColumnAndFlags & MORE_KEYS_FLAGS_HAS_LABELS) != 0; } + public boolean needsDividersInMoreKeys() { + return (mMoreKeysColumnAndFlags & MORE_KEYS_FLAGS_NEEDS_DIVIDERS) != 0; + } + public Drawable getIcon(KeyboardIconsSet iconSet) { return iconSet.getIconDrawable(mIconId); } |
