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
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 79cc139..701d195 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -311,6 +311,9 @@
<flag name="shiftedLetterActivated" value="0x20000" />
<!-- If true, use EditorInfo.actionLabel for the key label. -->
<flag name="fromCustomActionLabel" value="0x40000" />
+ <!-- If true, use functionalTextColor instead of ketTextColor to drawing the label on
+ the key -->
+ <flag name="followFunctionalTextColor" value="0x80000" />
<!-- If true, disable keyHintLabel. -->
<flag name="disableKeyHintLabel" value="0x40000000" />
<!-- If true, disable additionalMoreKeys. -->
@@ -367,6 +370,8 @@
<attr name="keyTextShadowColor" format="color" />
<!-- Color to use for the label in a key when in inactivated state. -->
<attr name="keyTextInactivatedColor" format="color" />
+ <!-- Color to use for the label in a key that has followFunctionalTextColor keyLabelFlags. -->
+ <attr name="functionalTextColor" format="color" />
<!-- Key hint letter (= one character hint label) color -->
<attr name="keyHintLetterColor" format="color" />
<!-- Key hint label color -->