diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2014-05-15 15:39:01 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2014-05-15 15:39:59 +0900 |
| commit | 37ec0fe9840aeb3fdf4a5749945045f7a76fd16b (patch) | |
| tree | 2cf8cee779f678fc7c918a4dd13fa8c810281ae2 /java/src/com/android/inputmethod/keyboard/Key.java | |
| parent | 50c21b5e9296a2cbde2ccd2b488f890f42291104 (diff) | |
Use slightly dimmed text color for functional keys
This CL introduces two new key attributes to achieve this.
- KeyboardView.functionalTextColor
- followFunctionalTextColor flag for Key.keyLabelFlags
Bug: 14419121
Change-Id: I45ca433dcc9cc8c6cf891e21d5316ee4048b0cad
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/Key.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 4c2250740..a1269c801 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -86,6 +86,7 @@ public class Key implements Comparable<Key> { private static final int LABEL_FLAGS_PRESERVE_CASE = 0x10000; private static final int LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED = 0x20000; private static final int LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL = 0x40000; + private static final int LABEL_FLAGS_FOLLOW_FUNCTIONAL_TEXT_COLOR = 0x80000; private static final int LABEL_FLAGS_DISABLE_HINT_LABEL = 0x40000000; private static final int LABEL_FLAGS_DISABLE_ADDITIONAL_MORE_KEYS = 0x80000000; @@ -583,6 +584,9 @@ public class Key implements Comparable<Key> { } public final int selectTextColor(final KeyDrawParams params) { + if ((mLabelFlags & LABEL_FLAGS_FOLLOW_FUNCTIONAL_TEXT_COLOR) != 0) { + return params.mFunctionalTextColor; + } return isShiftedLetterActivated() ? params.mTextInactivatedColor : params.mTextColor; } |
