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

Commit 30964843 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Auto generate various shift states alphabet keyboard automatically"

parents 16f74396 ca2f051c
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -60,16 +60,16 @@
        <attr name="keyHintLetterRatio" format="float" />
        <!-- Size of the text for hint label, in the proportion of key height. -->
        <attr name="keyHintLabelRatio" format="float" />
        <!-- Size of the text for upper case letter, in the proportion of key height. -->
        <attr name="keyUppercaseLetterRatio" format="float" />
        <!-- Size of the text for shifted letter hint, in the proportion of key height. -->
        <attr name="keyShiftedLetterHintRatio" format="float" />
        <!-- Horizontal padding of left/right aligned key label to the edge of the key. -->
        <attr name="keyLabelHorizontalPadding" format="dimension" />
        <!-- Top and right padding of hint letter to the edge of the key.-->
        <attr name="keyHintLetterPadding" format="dimension" />
        <!-- Bottom padding of popup hint letter "..." to the edge of the key.-->
        <attr name="keyPopupHintLetterPadding" format="dimension" />
        <!-- Top and right padding of upper case letter to the edge of the key.-->
        <attr name="keyUppercaseLetterPadding" format="dimension" />
        <!-- Top and right padding of shifted letter hint to the edge of the key.-->
        <attr name="keyShiftedLetterHintPadding" format="dimension" />

        <!-- Color to use for the label in a key. -->
        <attr name="keyTextColor" format="color" />
@@ -79,9 +79,9 @@
        <attr name="keyHintLetterColor" format="color" />
        <!-- Key hint label color -->
        <attr name="keyHintLabelColor" format="color" />
        <!-- Upper case letter colors -->
        <attr name="keyUppercaseLetterInactivatedColor" format="color" />
        <attr name="keyUppercaseLetterActivatedColor" format="color" />
        <!-- Shifted letter hint colors -->
        <attr name="keyShiftedLetterHintInactivatedColor" format="color" />
        <attr name="keyShiftedLetterHintActivatedColor" format="color" />

        <!-- Layout resource for key press feedback.-->
        <attr name="keyPreviewLayout" format="reference" />
@@ -240,7 +240,8 @@
            <enum name="normal" value="0" />
            <enum name="functional" value="1" />
            <enum name="action" value="2" />
            <enum name="sticky" value="3" />
            <enum name="stickyOff" value="3" />
            <enum name="stickyOn" value="4" />
        </attr>
        <!-- The key action flags. -->
        <attr name="keyActionFlags" format="integer">
@@ -267,7 +268,7 @@
            <flag name="followKeyLetterRatio" value="0x80" />
            <flag name="followKeyHintLabelRatio" value="0x100" />
            <flag name="hasPopupHint" value="0x200" />
            <flag name="hasUppercaseLetter" value="0x400" />
            <flag name="hasShiftedLetterHint" value="0x400" />
            <flag name="hasHintLabel" value="0x800" />
            <flag name="withIconLeft" value="0x1000" />
            <flag name="withIconRight" value="0x2000" />
@@ -275,10 +276,9 @@
            <!-- If true, character case of code, altCode, moreKeys, keyOutputText, keyLabel,
                 or keyHintLabel will never be subject to change. -->
            <flag name="preserveCase" value="0x8000" />
            <!-- If true, use keyTextInactivatedColor for the label -->
            <flag name="inactivatedLabel" value="0x10000" />
            <!-- If true, use keyUppercaseLetterInactivatedColor for the uppercase letter -->
            <flag name="inactivatedUppercaseLetter" value="0x20000" />
            <!-- If true, use keyShiftedLetterHintActivatedColor for the shifted letter hint and
                 keyTextInactivatedColor for the primary key top label. -->
            <flag name="shiftedLetterActivated" value="0x10000" />
        </attr>
        <!-- The icon to display on the key instead of the label. -->
        <attr name="keyIcon" format="enum">
@@ -407,7 +407,5 @@
            <enum name="number" value="9"  />
        </attr>
        <attr name="elementKeyboard" format="reference"/>
        <attr name="elementAutoGenerate" format="boolean" />
        <!-- TODO: Add setShifted and setShiftLocked attribute. -->
    </declare-styleable>
</resources>
+8 −8
Original line number Diff line number Diff line
@@ -39,18 +39,18 @@
        <item name="keyLabelRatio">@fraction/key_label_ratio</item>
        <item name="keyHintLetterRatio">@fraction/key_hint_letter_ratio</item>
        <item name="keyHintLabelRatio">@fraction/key_hint_label_ratio</item>
        <item name="keyUppercaseLetterRatio">@fraction/key_uppercase_letter_ratio</item>
        <item name="keyShiftedLetterHintRatio">@fraction/key_uppercase_letter_ratio</item>
        <item name="keyTextStyle">normal</item>
        <item name="keyTextColor">#FFFFFFFF</item>
        <item name="keyTextInactivatedColor">#FFFFFFFF</item>
        <item name="keyHintLetterColor">#80000000</item>
        <item name="keyHintLabelColor">#E0E0E4E5</item>
        <item name="keyUppercaseLetterInactivatedColor">#66E0E4E5</item>
        <item name="keyUppercaseLetterActivatedColor">#CCE0E4E5</item>
        <item name="keyShiftedLetterHintInactivatedColor">#66E0E4E5</item>
        <item name="keyShiftedLetterHintActivatedColor">#CCE0E4E5</item>
        <item name="keyLabelHorizontalPadding">@dimen/key_label_horizontal_padding</item>
        <item name="keyHintLetterPadding">@dimen/key_hint_letter_padding</item>
        <item name="keyPopupHintLetterPadding">@dimen/key_popup_hint_letter_padding</item>
        <item name="keyUppercaseLetterPadding">@dimen/key_uppercase_letter_padding</item>
        <item name="keyShiftedLetterHintPadding">@dimen/key_uppercase_letter_padding</item>
        <item name="keyPreviewLayout">@layout/key_preview</item>
        <item name="keyPreviewBackground">@drawable/keyboard_key_feedback</item>
        <item name="keyPreviewLeftBackground">@null</item>
@@ -181,8 +181,8 @@
        <item name="keyTextInactivatedColor">#FF808080</item>
        <item name="keyHintLetterColor">#80000000</item>
        <item name="keyHintLabelColor">#E0000000</item>
        <item name="keyUppercaseLetterInactivatedColor">#66000000</item>
        <item name="keyUppercaseLetterActivatedColor">#CC000000</item>
        <item name="keyShiftedLetterHintInactivatedColor">#66000000</item>
        <item name="keyShiftedLetterHintActivatedColor">#CC000000</item>
        <item name="shadowColor">#FFFFFFFF</item>
    </style>
    <style
@@ -298,8 +298,8 @@
        <item name="keyTextInactivatedColor">#66E0E4E5</item>
        <item name="keyHintLetterColor">#80000000</item>
        <item name="keyHintLabelColor">#A0FFFFFF</item>
        <item name="keyUppercaseLetterInactivatedColor">#66E0E4E5</item>
        <item name="keyUppercaseLetterActivatedColor">#FFFFFFFF</item>
        <item name="keyShiftedLetterHintInactivatedColor">#66E0E4E5</item>
        <item name="keyShiftedLetterHintActivatedColor">#FFFFFFFF</item>
        <item name="keyPreviewBackground">@drawable/keyboard_key_feedback_ics</item>
        <item name="keyPreviewLeftBackground">@drawable/keyboard_key_feedback_left_ics</item>
        <item name="keyPreviewRightBackground">@drawable/keyboard_key_feedback_right_ics</item>
+4 −4
Original line number Diff line number Diff line
@@ -33,18 +33,18 @@
        >
            <Key
                latin:keyLabel="-"
                latin:keyLabelFlags="hasUppercaseLetter"
                latin:keyHintLabel="_"
                latin:moreKeys="_" />
                latin:moreKeys="_"
                latin:keyStyle="hasShiftedLetterHintStyle" />
        </case>
        <case
            latin:imeAction="actionSearch"
        >
            <Key
                latin:keyLabel=":"
                latin:keyLabelFlags="hasUppercaseLetter"
                latin:keyHintLabel="+"
                latin:moreKeys="+" />
                latin:moreKeys="+"
                latin:keyStyle="hasShiftedLetterHintStyle" />
        </case>
        <default>
            <Key
+50 −8
Original line number Diff line number Diff line
@@ -38,13 +38,51 @@
                latin:backgroundType="functional" />
        </default>
    </switch>
    <switch>
        <case
            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
        >
            <key-style
                latin:styleName="hasShiftedLetterHintStyle"
                latin:keyLabelFlags="hasShiftedLetterHint|shiftedLetterActivated" />
        </case>
        <default>
            <key-style
                latin:styleName="hasShiftedLetterHintStyle"
                latin:keyLabelFlags="hasShiftedLetterHint" />
        </default>
    </switch>
    <!-- Functional key styles -->
    <switch>
        <case
            latin:keyboardSetElement="alphabetManualShifted|alphabetAutomaticShifted"
        >
            <key-style
                latin:styleName="shiftKeyStyle"
                latin:code="@integer/key_shift"
                latin:keyIcon="iconShiftKeyShifted"
                latin:keyActionFlags="noKeyPreview"
                latin:backgroundType="stickyOff" />
        </case>
        <case
            latin:keyboardSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
        >
            <key-style
                latin:styleName="shiftKeyStyle"
                latin:code="@integer/key_shift"
                latin:keyIcon="iconShiftKeyShifted"
                latin:keyActionFlags="noKeyPreview"
                latin:backgroundType="stickyOn" />
        </case>
        <default>
            <key-style
                latin:styleName="shiftKeyStyle"
                latin:code="@integer/key_shift"
                latin:keyIcon="iconShiftKey"
                latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="sticky" />
                latin:backgroundType="stickyOff" />
        </default>
    </switch>
    <key-style
        latin:styleName="deleteKeyStyle"
        latin:code="@integer/key_delete"
@@ -69,7 +107,7 @@
        latin:styleName="smileyKeyStyle"
        latin:keyLabel=":-)"
        latin:keyOutputText=":-) "
        latin:keyLabelFlags="hasPopupHint"
        latin:keyLabelFlags="hasPopupHint|preserveCase"
        latin:moreKeys="@string/more_keys_for_smiley"
        latin:maxMoreKeysColumn="5" />
    <key-style
@@ -95,30 +133,34 @@
        latin:styleName="toSymbolKeyStyle"
        latin:code="@integer/key_switch_alpha_symbol"
        latin:keyLabel="@string/label_to_symbol_key"
        latin:keyLabelFlags="preserveCase"
        latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="functional" />
    <key-style
        latin:styleName="toAlphaKeyStyle"
        latin:code="@integer/key_switch_alpha_symbol"
        latin:keyLabel="@string/label_to_alpha_key"
        latin:keyLabelFlags="preserveCase"
        latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="functional" />
    <key-style
        latin:styleName="toMoreSymbolKeyStyle"
        latin:code="@integer/key_shift"
        latin:keyLabel="@string/label_to_more_symbol_for_tablet_key"
        latin:keyLabelFlags="preserveCase"
        latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="functional" />
    <key-style
        latin:styleName="backFromMoreSymbolKeyStyle"
        latin:code="@integer/key_shift"
        latin:keyLabel="@string/label_to_symbol_key"
        latin:keyLabelFlags="preserveCase"
        latin:keyActionFlags="noKeyPreview"
        latin:backgroundType="functional" />
    <key-style
        latin:styleName="comKeyStyle"
        latin:keyLabel="@string/keylabel_for_popular_domain"
        latin:keyLabelFlags="fontNormal|hasPopupHint"
        latin:keyLabelFlags="fontNormal|hasPopupHint|preserveCase"
        latin:keyOutputText="@string/keylabel_for_popular_domain"
        latin:moreKeys="@string/more_keys_for_popular_domain" />
</merge>
+6 −6
Original line number Diff line number Diff line
@@ -33,16 +33,16 @@
        >
            <Key
                latin:keyLabel="/"
                latin:keyLabelFlags="hasUppercaseLetter"
                latin:keyHintLabel=":"
                latin:moreKeys=":" />
                latin:moreKeys=":"
                latin:keyStyle="hasShiftedLetterHintStyle" />
        </case>
        <default>
            <Key
                latin:keyLabel="@string/keylabel_for_apostrophe"
                latin:keyLabelFlags="hasUppercaseLetter"
                latin:keyHintLabel="@string/keyhintlabel_for_apostrophe"
                latin:moreKeys="@string/more_keys_for_apostrophe" />
                latin:moreKeys="@string/more_keys_for_apostrophe"
                latin:keyStyle="hasShiftedLetterHintStyle" />
        </default>
    </switch>
    <switch>
@@ -55,9 +55,9 @@
        <default>
            <Key
                latin:keyLabel="@string/keylabel_for_dash"
                latin:keyLabelFlags="hasUppercaseLetter"
                latin:keyHintLabel="@string/keyhintlabel_for_dash"
                latin:moreKeys="@string/more_keys_for_dash" />
                latin:moreKeys="@string/more_keys_for_dash"
                latin:keyStyle="hasShiftedLetterHintStyle" />
        </default>
    </switch>
</merge>
Loading