Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37ec0fe9 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

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
parent 50c21b5e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 -->
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
        <item name="keyTypeface">bold</item>
        <item name="keyTextColor">@color/key_text_color_holo</item>
        <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_holo</item>
        <item name="functionalTextColor">@color/key_text_color_holo</item>
        <item name="keyHintLetterColor">@color/key_hint_letter_color_holo</item>
        <item name="keyHintLabelColor">@color/key_hint_label_color_holo</item>
        <item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_holo</item>
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
        <item name="keyTypeface">bold</item>
        <item name="keyTextColor">@color/key_text_color_holo</item>
        <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_holo</item>
        <item name="functionalTextColor">@color/key_text_color_holo</item>
        <item name="keyHintLetterColor">@color/key_hint_letter_color_holo</item>
        <item name="keyHintLabelColor">@color/key_hint_label_color_holo</item>
        <item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_holo</item>
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
        <item name="keyTypeface">bold</item>
        <item name="keyTextColor">@color/key_text_color_holo</item>
        <item name="keyTextInactivatedColor">@color/key_text_inactive_color_lxx</item>
        <item name="functionalTextColor">@color/key_hint_letter_color_lxx</item>
        <item name="keyHintLetterColor">@color/key_hint_letter_color_lxx</item>
        <item name="keyHintLabelColor">@color/key_text_inactive_color_lxx</item>
        <item name="keyShiftedLetterHintInactivatedColor">@color/key_text_inactive_color_lxx</item>
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@
    </switch>
    <key-style
        latin:styleName="baseForLayoutSwitchKeyStyle"
        latin:keyLabelFlags="preserveCase"
        latin:keyLabelFlags="preserveCase|followFunctionalTextColor"
        latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="functional" />
    <key-style
Loading