am 13d5f660
: Add Key.keyActionFlags and obsolete Key.isRepeatable
* commit '13d5f6605be6a6e8d9e5dde5b204dc050a862550': Add Key.keyActionFlags and obsolete Key.isRepeatable
This commit is contained in:
commit
5b3a8b11ea
36 changed files with 185 additions and 192 deletions
|
@ -196,17 +196,21 @@
|
|||
<enum name="action" value="2" />
|
||||
<enum name="sticky" value="3" />
|
||||
</attr>
|
||||
<!-- Whether long-pressing on this key will make it repeat. -->
|
||||
<attr name="isRepeatable" format="boolean" />
|
||||
<!-- The key action flags. -->
|
||||
<attr name="keyActionFlags" format="integer">
|
||||
<!-- This should be aligned with Key.ACTION_FLAGS_* -->
|
||||
<flag name="isRepeatable" value="0x01" />
|
||||
<flag name="noKeyPreview" value="0x02" />
|
||||
</attr>
|
||||
<!-- The string of characters to output when this key is pressed. -->
|
||||
<attr name="keyOutputText" format="string" />
|
||||
<!-- The label to display on the key. -->
|
||||
<attr name="keyLabel" format="string" />
|
||||
<!-- The hint label to display on the key in conjunction with the label. -->
|
||||
<attr name="keyHintLabel" format="string" />
|
||||
<!-- The key label option. -->
|
||||
<attr name="keyLabelOption" format="integer">
|
||||
<!-- This should be aligned with Key.LABEL_OPTION_* -->
|
||||
<!-- The key label flags. -->
|
||||
<attr name="keyLabelFlags" format="integer">
|
||||
<!-- This should be aligned with Key.LABEL_FLAGS__* -->
|
||||
<flag name="alignLeft" value="0x01" />
|
||||
<flag name="alignRight" value="0x02" />
|
||||
<flag name="alignLeftOfCenter" value="0x08" />
|
||||
|
@ -221,7 +225,6 @@
|
|||
<flag name="withIconLeft" value="0x1000" />
|
||||
<flag name="withIconRight" value="0x2000" />
|
||||
<flag name="autoXScale" value="0x4000" />
|
||||
<flag name="noKeyPreview" value="0x8000" />
|
||||
</attr>
|
||||
<!-- The icon to display on the key instead of the label. -->
|
||||
<attr name="keyIcon" format="enum">
|
||||
|
@ -248,8 +251,6 @@
|
|||
</attr>
|
||||
<!-- The key style to specify a set of key attributes defined by <key_style/> -->
|
||||
<attr name="keyStyle" format="string" />
|
||||
<!-- The key is enabled and responds on press. -->
|
||||
<attr name="enabled" format="boolean" />
|
||||
<!-- Visual insets -->
|
||||
<attr name="visualInsetsLeft" format="dimension|fraction" />
|
||||
<attr name="visualInsetsRight" format="dimension|fraction" />
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<default>
|
||||
<key-style
|
||||
latin:styleName="f2PopupStyle"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="\@icon/3|\@integer/key_settings"
|
||||
latin:backgroundType="functional" />
|
||||
</default>
|
||||
|
@ -44,47 +44,46 @@
|
|||
latin:code="@integer/key_shift"
|
||||
latin:keyIcon="iconShiftKey"
|
||||
latin:keyIconShifted="iconShiftedShiftKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="sticky" />
|
||||
<key-style
|
||||
latin:styleName="deleteKeyStyle"
|
||||
latin:code="@integer/key_delete"
|
||||
latin:keyIcon="iconDeleteKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:backgroundType="functional"
|
||||
latin:isRepeatable="true" />
|
||||
latin:keyActionFlags="isRepeatable|noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyIcon="iconReturnKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="spaceKeyStyle"
|
||||
latin:code="@integer/key_space"
|
||||
latin:keyLabelOption="noKeyPreview" />
|
||||
latin:keyActionFlags="noKeyPreview" />
|
||||
<key-style
|
||||
latin:styleName="nonSpecialBackgroundSpaceKeyStyle"
|
||||
latin:code="@integer/key_space"
|
||||
latin:keyLabelOption="noKeyPreview" />
|
||||
latin:keyActionFlags="noKeyPreview" />
|
||||
<key-style
|
||||
latin:styleName="smileyKeyStyle"
|
||||
latin:keyLabel=":-)"
|
||||
latin:keyOutputText=":-) "
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_smiley"
|
||||
latin:maxMoreKeysColumn="5" />
|
||||
<key-style
|
||||
latin:styleName="shortcutKeyStyle"
|
||||
latin:code="@integer/key_shortcut"
|
||||
latin:keyIcon="iconShortcutKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:parentStyle="f2PopupStyle" />
|
||||
<key-style
|
||||
latin:styleName="settingsKeyStyle"
|
||||
latin:code="@integer/key_settings"
|
||||
latin:keyIcon="iconSettingsKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="tabKeyStyle"
|
||||
|
@ -96,30 +95,30 @@
|
|||
latin:styleName="toSymbolKeyStyle"
|
||||
latin:code="@integer/key_switch_alpha_symbol"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
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:keyLabelOption="noKeyPreview"
|
||||
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:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="backFromMoreSymbolKeyStyle"
|
||||
latin:code="@integer/key_shift"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="comKeyStyle"
|
||||
latin:keyLabel="@string/keylabel_for_popular_domain"
|
||||
latin:keyLabelOption="fontNormal|hasPopupHint"
|
||||
latin:keyLabelFlags="fontNormal|hasPopupHint"
|
||||
latin:keyOutputText="@string/keylabel_for_popular_domain"
|
||||
latin:moreKeys="@string/more_keys_for_popular_domain" />
|
||||
</merge>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel="/"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\@"
|
||||
latin:moreKeys="\@" />
|
||||
</default>
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="_"
|
||||
latin:moreKeys="_"
|
||||
latin:keyXPos="-8.9%p"
|
||||
|
@ -46,7 +46,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel=":"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="+"
|
||||
latin:moreKeys="+"
|
||||
latin:keyXPos="-8.9%p"
|
||||
|
|
|
@ -33,14 +33,14 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel="/"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel=":"
|
||||
latin:moreKeys=":" />
|
||||
</case>
|
||||
<default>
|
||||
<Key
|
||||
latin:keyLabel="@string/keylabel_for_apostrophe"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="@string/keyhintlabel_for_apostrophe"
|
||||
latin:moreKeys="@string/more_keys_for_apostrophe" />
|
||||
</default>
|
||||
|
@ -55,7 +55,7 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel="@string/keylabel_for_dash"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="@string/keyhintlabel_for_dash"
|
||||
latin:moreKeys="@string/more_keys_for_dash" />
|
||||
</default>
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="_"
|
||||
latin:moreKeys="_" />
|
||||
</case>
|
||||
|
@ -167,7 +167,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel=":"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="+"
|
||||
latin:moreKeys="+" />
|
||||
</case>
|
||||
|
|
|
@ -132,12 +132,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="_"
|
||||
latin:moreKeys="_"
|
||||
latin:keyWidth="10.0%p" />
|
||||
|
@ -104,7 +104,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel=":"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="+"
|
||||
latin:moreKeys="+"
|
||||
latin:keyWidth="10.0%p" />
|
||||
|
|
|
@ -99,12 +99,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -122,12 +122,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -26,82 +26,85 @@
|
|||
latin:code="@integer/key_shift"
|
||||
latin:keyIcon="iconShiftKey"
|
||||
latin:keyIconShifted="iconShiftedShiftKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="sticky" />
|
||||
<key-style
|
||||
latin:styleName="deleteKeyStyle"
|
||||
latin:code="@integer/key_delete"
|
||||
latin:keyIcon="iconDeleteKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:backgroundType="functional"
|
||||
latin:isRepeatable="true" />
|
||||
latin:keyActionFlags="isRepeatable|noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyIcon="iconReturnKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="spaceKeyStyle"
|
||||
latin:code="@integer/key_space"
|
||||
latin:keyLabelOption="noKeyPreview" />
|
||||
latin:keyActionFlags="noKeyPreview" />
|
||||
<key-style
|
||||
latin:styleName="nonSpecialBackgroundSpaceKeyStyle"
|
||||
latin:code="@integer/key_space"
|
||||
latin:keyLabelOption="noKeyPreview" />
|
||||
latin:keyActionFlags="noKeyPreview" />
|
||||
<key-style
|
||||
latin:styleName="smileyKeyStyle"
|
||||
latin:keyLabel=":-)"
|
||||
latin:keyOutputText=":-) "
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_smiley"
|
||||
latin:maxMoreKeysColumn="5" />
|
||||
<key-style
|
||||
latin:styleName="settingsKeyStyle"
|
||||
latin:code="@integer/key_settings"
|
||||
latin:keyIcon="iconSettingsKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="shortcutKeyStyle"
|
||||
latin:code="@integer/key_shortcut"
|
||||
latin:keyIcon="iconShortcutKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="tabKeyStyle"
|
||||
latin:code="@integer/key_tab"
|
||||
latin:keyLabel="@string/label_tab_key"
|
||||
latin:keyLabelOption="fontNormal"
|
||||
latin:keyLabelFlags="fontNormal"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="toSymbolKeyStyle"
|
||||
latin:code="@integer/key_switch_alpha_symbol"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="fontNormal|noKeyPreview"
|
||||
latin:keyLabelFlags="fontNormal"
|
||||
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:keyLabelOption="fontNormal|noKeyPreview"
|
||||
latin:keyLabelFlags="fontNormal"
|
||||
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:keyLabelOption="fontNormal|noKeyPreview"
|
||||
latin:keyLabelFlags="fontNormal"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="backFromMoreSymbolKeyStyle"
|
||||
latin:code="@integer/key_shift"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="fontNormal|noKeyPreview"
|
||||
latin:keyLabelFlags="fontNormal"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="comKeyStyle"
|
||||
latin:keyLabel="@string/keylabel_for_popular_domain"
|
||||
latin:keyLabelOption="fontNormal|hasPopupHint"
|
||||
latin:keyLabelFlags="fontNormal|hasPopupHint"
|
||||
latin:keyOutputText="@string/keylabel_for_popular_domain"
|
||||
latin:moreKeys="@string/more_keys_for_popular_domain" />
|
||||
</merge>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p"/>
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel=":"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="+"
|
||||
latin:moreKeys="+" />
|
||||
</case>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel="/"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\@"
|
||||
latin:moreKeys="\@" />
|
||||
</default>
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -33,14 +33,14 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyLabel="/"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel=":"
|
||||
latin:moreKeys=":" />
|
||||
</case>
|
||||
<default>
|
||||
<Key
|
||||
latin:keyLabel="@string/keylabel_for_apostrophe"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="@string/keyhintlabel_for_apostrophe"
|
||||
latin:moreKeys="@string/more_keys_for_apostrophe" />
|
||||
</default>
|
||||
|
@ -55,7 +55,7 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel="@string/keylabel_for_dash"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="@string/keyhintlabel_for_dash"
|
||||
latin:moreKeys="@string/more_keys_for_dash" />
|
||||
</default>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.500%p" />
|
||||
<!-- \u0636: ARABIC LETTER DAD -->
|
||||
<Key
|
||||
|
@ -84,7 +84,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="9.375%p" />
|
||||
<!-- \u0634: ARABIC LETTER SHEEN
|
||||
\u069c: ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE -->
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
|
@ -70,7 +70,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="10.167%p" />
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
|
@ -127,7 +127,7 @@
|
|||
latin:moreKeys="@string/more_keys_for_n" />
|
||||
<Key
|
||||
latin:keyLabel="\'"
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel=":"
|
||||
latin:moreKeys=":" />
|
||||
<switch>
|
||||
|
@ -142,12 +142,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/kbd_row4_apostrophe_dash" />
|
||||
|
@ -58,7 +58,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="ש" />
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyStyle="numTabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyStyle="num1KeyStyle"
|
||||
|
@ -90,7 +90,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyStyle="numTabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<Row>
|
||||
<Key
|
||||
latin:keyStyle="numTabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="-"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
|
@ -103,12 +103,12 @@
|
|||
<default>
|
||||
<Key
|
||||
latin:keyLabel=","
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="!"
|
||||
latin:moreKeys="!" />
|
||||
<Key
|
||||
latin:keyLabel="."
|
||||
latin:keyLabelOption="hasUppercaseLetter"
|
||||
latin:keyLabelFlags="hasUppercaseLetter"
|
||||
latin:keyHintLabel="\?"
|
||||
latin:moreKeys="\?" />
|
||||
</default>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft" />
|
||||
latin:keyLabelFlags="alignLeft" />
|
||||
<Key
|
||||
latin:keyLabel="й" />
|
||||
<Key
|
||||
|
@ -63,7 +63,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="9.375%p" />
|
||||
<Key
|
||||
latin:keyLabel="ф" />
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.500%p" />
|
||||
<Key
|
||||
latin:keyLabel="q"
|
||||
|
@ -72,7 +72,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="9.375%p" />
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft" />
|
||||
latin:keyLabelFlags="alignLeft" />
|
||||
<Key
|
||||
latin:keyLabel="љ" />
|
||||
<Key
|
||||
|
@ -62,7 +62,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="а" />
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="10.167%p" />
|
||||
<Key
|
||||
latin:keyLabel="a"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<Key
|
||||
latin:keyLabel="@string/keylabel_for_symbols_1"
|
||||
|
@ -72,7 +72,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toAlphaKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyLabel="#" />
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<Key
|
||||
latin:keyLabel="~" />
|
||||
|
@ -65,7 +65,7 @@
|
|||
>
|
||||
<Key
|
||||
latin:keyStyle="toAlphaKeyStyle"
|
||||
latin:keyLabelOption="alignLeft"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<Key
|
||||
latin:keyStyle="moreCurrency1KeyStyle" />
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
>
|
||||
<key-style
|
||||
latin:styleName="f1PopupStyle"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_f1"
|
||||
latin:backgroundType="functional" />
|
||||
</case>
|
||||
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<key-style
|
||||
latin:styleName="f1PopupStyle"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_f1_settings"
|
||||
latin:backgroundType="functional" />
|
||||
</case>
|
||||
|
@ -48,7 +48,7 @@
|
|||
>
|
||||
<key-style
|
||||
latin:styleName="f1PopupStyle"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_f1_navigate"
|
||||
latin:backgroundType="functional" />
|
||||
</case>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<default>
|
||||
<key-style
|
||||
latin:styleName="f1PopupStyle"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_f1"
|
||||
latin:backgroundType="functional" />
|
||||
</default>
|
||||
|
@ -67,15 +67,14 @@
|
|||
latin:code="@integer/key_shift"
|
||||
latin:keyIcon="iconShiftKey"
|
||||
latin:keyIconShifted="iconShiftedShiftKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="sticky" />
|
||||
<key-style
|
||||
latin:styleName="deleteKeyStyle"
|
||||
latin:code="@integer/key_delete"
|
||||
latin:keyIcon="iconDeleteKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:backgroundType="functional"
|
||||
latin:isRepeatable="true" />
|
||||
latin:keyActionFlags="isRepeatable|noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<!-- Return key style -->
|
||||
<switch>
|
||||
<case
|
||||
|
@ -86,7 +85,7 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:keyLabel=":-)"
|
||||
latin:keyOutputText=":-) "
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_smiley"
|
||||
latin:maxMoreKeysColumn="5"
|
||||
latin:backgroundType="functional" />
|
||||
|
@ -98,7 +97,8 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyLabel="@string/label_go_key"
|
||||
latin:keyLabelOption="autoXScale|noKeyPreview"
|
||||
latin:keyLabelFlags="autoXScale"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="action" />
|
||||
</case>
|
||||
<case
|
||||
|
@ -108,7 +108,8 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyLabel="@string/label_next_key"
|
||||
latin:keyLabelOption="autoXScale|noKeyPreview"
|
||||
latin:keyLabelFlags="autoXScale"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="action" />
|
||||
</case>
|
||||
<case
|
||||
|
@ -118,7 +119,8 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyLabel="@string/label_done_key"
|
||||
latin:keyLabelOption="autoXScale|noKeyPreview"
|
||||
latin:keyLabelFlags="autoXScale"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="action" />
|
||||
</case>
|
||||
<case
|
||||
|
@ -128,7 +130,8 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyLabel="@string/label_send_key"
|
||||
latin:keyLabelOption="autoXScale|noKeyPreview"
|
||||
latin:keyLabelFlags="autoXScale"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="action" />
|
||||
</case>
|
||||
<case
|
||||
|
@ -138,7 +141,8 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyIcon="iconSearchKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyLabelFlags="autoXScale"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="action" />
|
||||
</case>
|
||||
<default>
|
||||
|
@ -146,26 +150,26 @@
|
|||
latin:styleName="returnKeyStyle"
|
||||
latin:code="@integer/key_return"
|
||||
latin:keyIcon="iconReturnKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
</default>
|
||||
</switch>
|
||||
<key-style
|
||||
latin:styleName="spaceKeyStyle"
|
||||
latin:code="@integer/key_space"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="shortcutKeyStyle"
|
||||
latin:code="@integer/key_shortcut"
|
||||
latin:keyIcon="iconShortcutKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:parentStyle="f1PopupStyle" />
|
||||
<key-style
|
||||
latin:styleName="settingsKeyStyle"
|
||||
latin:code="@integer/key_settings"
|
||||
latin:keyIcon="iconSettingsKey"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="tabKeyStyle"
|
||||
|
@ -193,7 +197,8 @@
|
|||
latin:code="@integer/key_switch_alpha_symbol"
|
||||
latin:keyIcon="iconShortcutForLabel"
|
||||
latin:keyLabel="@string/label_to_symbol_with_microphone_key"
|
||||
latin:keyLabelOption="withIconRight|noKeyPreview"
|
||||
latin:keyLabelFlags="withIconRight"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
</case>
|
||||
<default>
|
||||
|
@ -201,7 +206,7 @@
|
|||
latin:styleName="toSymbolKeyStyle"
|
||||
latin:code="@integer/key_switch_alpha_symbol"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
</default>
|
||||
</switch>
|
||||
|
@ -209,25 +214,25 @@
|
|||
latin:styleName="toAlphaKeyStyle"
|
||||
latin:code="@integer/key_switch_alpha_symbol"
|
||||
latin:keyLabel="@string/label_to_alpha_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="toMoreSymbolKeyStyle"
|
||||
latin:code="@integer/key_shift"
|
||||
latin:keyLabel="@string/label_to_more_symbol_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="backFromMoreSymbolKeyStyle"
|
||||
latin:code="@integer/key_shift"
|
||||
latin:keyLabel="@string/label_to_symbol_key"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:backgroundType="functional" />
|
||||
<key-style
|
||||
latin:styleName="punctuationKeyStyle"
|
||||
latin:keyLabel="."
|
||||
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
|
||||
latin:keyLabelOption="hasPopupHint"
|
||||
latin:keyLabelFlags="hasPopupHint"
|
||||
latin:moreKeys="@string/more_keys_for_punctuation"
|
||||
latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation"
|
||||
latin:backgroundType="functional" />
|
||||
|
|
|
@ -23,23 +23,23 @@
|
|||
>
|
||||
<key-style
|
||||
latin:styleName="numKeyBaseStyle"
|
||||
latin:keyLabelOption="noKeyPreview" />
|
||||
latin:keyActionFlags="noKeyPreview" />
|
||||
<key-style
|
||||
latin:styleName="numKeyStyle"
|
||||
latin:keyLabelOption="largeLetter|followKeyLetterRatio"
|
||||
latin:keyLabelFlags="largeLetter|followKeyLetterRatio"
|
||||
latin:parentStyle="numKeyBaseStyle" />
|
||||
<key-style
|
||||
latin:styleName="numModeKeyStyle"
|
||||
latin:keyLabelOption="fontNormal|followKeyLetterRatio"
|
||||
latin:keyLabelFlags="fontNormal|followKeyLetterRatio"
|
||||
latin:parentStyle="numKeyBaseStyle" />
|
||||
<key-style
|
||||
latin:styleName="numFunctionalKeyStyle"
|
||||
latin:keyLabelOption="largeLetter|followKeyLetterRatio"
|
||||
latin:keyLabelFlags="largeLetter|followKeyLetterRatio"
|
||||
latin:backgroundType="functional"
|
||||
latin:parentStyle="numKeyBaseStyle" />
|
||||
<key-style
|
||||
latin:styleName="numberKeyStyle"
|
||||
latin:keyLabelOption="alignLeftOfCenter|hasHintLabel"
|
||||
latin:keyLabelFlags="alignLeftOfCenter|hasHintLabel"
|
||||
latin:parentStyle="numKeyStyle" />
|
||||
<key-style
|
||||
latin:styleName="num0KeyStyle"
|
||||
|
@ -109,17 +109,17 @@
|
|||
latin:styleName="numPauseKeyStyle"
|
||||
latin:code="44"
|
||||
latin:keyLabel="@string/label_pause_key"
|
||||
latin:keyLabelOption="followKeyHintLabelRatio|autoXScale"
|
||||
latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale"
|
||||
latin:parentStyle="numKeyBaseStyle" />
|
||||
<key-style
|
||||
latin:styleName="numWaitKeyStyle"
|
||||
latin:code="59"
|
||||
latin:keyLabel="@string/label_wait_key"
|
||||
latin:keyLabelOption="followKeyHintLabelRatio|autoXScale"
|
||||
latin:keyLabelFlags="followKeyHintLabelRatio|autoXScale"
|
||||
latin:parentStyle="numKeyBaseStyle" />
|
||||
<key-style
|
||||
latin:styleName="numTabKeyStyle"
|
||||
latin:keyLabelOption="noKeyPreview"
|
||||
latin:keyActionFlags="noKeyPreview"
|
||||
latin:parentStyle="tabKeyStyle" />
|
||||
<key-style
|
||||
latin:styleName="numSpaceKeyStyle"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
latin:keyStyle="toAlphaKeyStyle"
|
||||
latin:keyWidth="15%p" />
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for ‟ Double high-reversed-9 quotation mark U+201F. -->
|
||||
<!-- latin:keyLabelOption="hasPopupHint" -->
|
||||
<!-- latin:keyLabelFlags="hasPopupHint" -->
|
||||
<!-- latin:moreKeys="‟" -->
|
||||
<Key
|
||||
latin:keyLabel="„"
|
||||
|
@ -56,7 +56,7 @@
|
|||
<include
|
||||
latin:keyboardLayout="@xml/kbd_settings_or_tab" />
|
||||
<!-- Note: Neither DroidSans nor Roboto have a glyph for ‟ Double high-reversed-9 quotation mark U+201F. -->
|
||||
<!-- latin:keyLabelOption="hasPopupHint" -->
|
||||
<!-- latin:keyLabelFlags="hasPopupHint" -->
|
||||
<!-- latin:moreKeys="‟" -->
|
||||
<Key
|
||||
latin:keyLabel="„"
|
||||
|
|
|
@ -51,23 +51,22 @@ public class Key {
|
|||
public final CharSequence mLabel;
|
||||
/** Hint label to display on the key in conjunction with the label */
|
||||
public final CharSequence mHintLabel;
|
||||
/** Option of the label */
|
||||
private final int mLabelOption;
|
||||
private static final int LABEL_OPTION_ALIGN_LEFT = 0x01;
|
||||
private static final int LABEL_OPTION_ALIGN_RIGHT = 0x02;
|
||||
private static final int LABEL_OPTION_ALIGN_LEFT_OF_CENTER = 0x08;
|
||||
private static final int LABEL_OPTION_LARGE_LETTER = 0x10;
|
||||
private static final int LABEL_OPTION_FONT_NORMAL = 0x20;
|
||||
private static final int LABEL_OPTION_FONT_MONO_SPACE = 0x40;
|
||||
private static final int LABEL_OPTION_FOLLOW_KEY_LETTER_RATIO = 0x80;
|
||||
private static final int LABEL_OPTION_FOLLOW_KEY_HINT_LABEL_RATIO = 0x100;
|
||||
private static final int LABEL_OPTION_HAS_POPUP_HINT = 0x200;
|
||||
private static final int LABEL_OPTION_HAS_UPPERCASE_LETTER = 0x400;
|
||||
private static final int LABEL_OPTION_HAS_HINT_LABEL = 0x800;
|
||||
private static final int LABEL_OPTION_WITH_ICON_LEFT = 0x1000;
|
||||
private static final int LABEL_OPTION_WITH_ICON_RIGHT = 0x2000;
|
||||
private static final int LABEL_OPTION_AUTO_X_SCALE = 0x4000;
|
||||
private static final int LABEL_OPTION_NO_KEY_PREVIEW = 0x8000;
|
||||
/** Flags of the label */
|
||||
private final int mLabelFlags;
|
||||
private static final int LABEL_FLAGS_ALIGN_LEFT = 0x01;
|
||||
private static final int LABEL_FLAGS_ALIGN_RIGHT = 0x02;
|
||||
private static final int LABEL_FLAGS_ALIGN_LEFT_OF_CENTER = 0x08;
|
||||
private static final int LABEL_FLAGS_LARGE_LETTER = 0x10;
|
||||
private static final int LABEL_FLAGS_FONT_NORMAL = 0x20;
|
||||
private static final int LABEL_FLAGS_FONT_MONO_SPACE = 0x40;
|
||||
private static final int LABEL_FLAGS_FOLLOW_KEY_LETTER_RATIO = 0x80;
|
||||
private static final int LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO = 0x100;
|
||||
private static final int LABEL_FLAGS_HAS_POPUP_HINT = 0x200;
|
||||
private static final int LABEL_FLAGS_HAS_UPPERCASE_LETTER = 0x400;
|
||||
private static final int LABEL_FLAGS_HAS_HINT_LABEL = 0x800;
|
||||
private static final int LABEL_FLAGS_WITH_ICON_LEFT = 0x1000;
|
||||
private static final int LABEL_FLAGS_WITH_ICON_RIGHT = 0x2000;
|
||||
private static final int LABEL_FLAGS_AUTO_X_SCALE = 0x4000;
|
||||
|
||||
/** Icon to display instead of a label. Icon takes precedence over a label */
|
||||
private Drawable mIcon;
|
||||
|
@ -106,8 +105,9 @@ public class Key {
|
|||
public static final int BACKGROUND_TYPE_ACTION = 2;
|
||||
public static final int BACKGROUND_TYPE_STICKY = 3;
|
||||
|
||||
/** Whether this key repeats itself when held down */
|
||||
public final boolean mRepeatable;
|
||||
private final int mActionFlags;
|
||||
private static final int ACTION_FLAGS_IS_REPEATABLE = 0x01;
|
||||
private static final int ACTION_FLAGS_NO_KEY_PREVIEW = 0x02;
|
||||
|
||||
/** The current pressed state of this key */
|
||||
private boolean mPressed;
|
||||
|
@ -182,9 +182,9 @@ public class Key {
|
|||
mVisualInsetsLeft = mVisualInsetsRight = 0;
|
||||
mWidth = width - mHorizontalGap;
|
||||
mHintLabel = hintLabel;
|
||||
mLabelOption = 0;
|
||||
mLabelFlags = 0;
|
||||
mBackgroundType = BACKGROUND_TYPE_NORMAL;
|
||||
mRepeatable = false;
|
||||
mActionFlags = 0;
|
||||
mMoreKeys = null;
|
||||
mMaxMoreKeysColumn = 0;
|
||||
mLabel = label;
|
||||
|
@ -255,8 +255,7 @@ public class Key {
|
|||
|
||||
mBackgroundType = style.getInt(keyAttr,
|
||||
R.styleable.Keyboard_Key_backgroundType, BACKGROUND_TYPE_NORMAL);
|
||||
mRepeatable = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isRepeatable, false);
|
||||
mEnabled = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_enabled, true);
|
||||
mActionFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyActionFlags, 0);
|
||||
|
||||
final KeyboardIconsSet iconsSet = params.mIconsSet;
|
||||
mVisualInsetsLeft = (int) KeyboardBuilder.getDimensionOrFraction(keyAttr,
|
||||
|
@ -276,7 +275,7 @@ public class Key {
|
|||
mHintLabel = style.getText(keyAttr, R.styleable.Keyboard_Key_keyHintLabel);
|
||||
|
||||
mLabel = style.getText(keyAttr, R.styleable.Keyboard_Key_keyLabel);
|
||||
mLabelOption = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelOption, 0);
|
||||
mLabelFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags, 0);
|
||||
mOutputText = style.getText(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
|
||||
// Choose the first letter of the label as primary code if not
|
||||
// specified.
|
||||
|
@ -318,11 +317,19 @@ public class Key {
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean isRepeatable() {
|
||||
return (mActionFlags & ACTION_FLAGS_IS_REPEATABLE) != 0;
|
||||
}
|
||||
|
||||
public boolean noKeyPreview() {
|
||||
return (mActionFlags & ACTION_FLAGS_NO_KEY_PREVIEW) != 0;
|
||||
}
|
||||
|
||||
public Typeface selectTypeface(Typeface defaultTypeface) {
|
||||
// TODO: Handle "bold" here too?
|
||||
if ((mLabelOption & LABEL_OPTION_FONT_NORMAL) != 0) {
|
||||
if ((mLabelFlags & LABEL_FLAGS_FONT_NORMAL) != 0) {
|
||||
return Typeface.DEFAULT;
|
||||
} else if ((mLabelOption & LABEL_OPTION_FONT_MONO_SPACE) != 0) {
|
||||
} else if ((mLabelFlags & LABEL_FLAGS_FONT_MONO_SPACE) != 0) {
|
||||
return Typeface.MONOSPACE;
|
||||
} else {
|
||||
return defaultTypeface;
|
||||
|
@ -331,12 +338,12 @@ public class Key {
|
|||
|
||||
public int selectTextSize(int letter, int largeLetter, int label, int hintLabel) {
|
||||
if (mLabel.length() > 1
|
||||
&& (mLabelOption & (LABEL_OPTION_FOLLOW_KEY_LETTER_RATIO
|
||||
| LABEL_OPTION_FOLLOW_KEY_HINT_LABEL_RATIO)) == 0) {
|
||||
&& (mLabelFlags & (LABEL_FLAGS_FOLLOW_KEY_LETTER_RATIO
|
||||
| LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO)) == 0) {
|
||||
return label;
|
||||
} else if ((mLabelOption & LABEL_OPTION_FOLLOW_KEY_HINT_LABEL_RATIO) != 0) {
|
||||
} else if ((mLabelFlags & LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO) != 0) {
|
||||
return hintLabel;
|
||||
} else if ((mLabelOption & LABEL_OPTION_LARGE_LETTER) != 0) {
|
||||
} else if ((mLabelFlags & LABEL_FLAGS_LARGE_LETTER) != 0) {
|
||||
return largeLetter;
|
||||
} else {
|
||||
return letter;
|
||||
|
@ -344,19 +351,19 @@ public class Key {
|
|||
}
|
||||
|
||||
public boolean isAlignLeft() {
|
||||
return (mLabelOption & LABEL_OPTION_ALIGN_LEFT) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_ALIGN_LEFT) != 0;
|
||||
}
|
||||
|
||||
public boolean isAlignRight() {
|
||||
return (mLabelOption & LABEL_OPTION_ALIGN_RIGHT) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_ALIGN_RIGHT) != 0;
|
||||
}
|
||||
|
||||
public boolean isAlignLeftOfCenter() {
|
||||
return (mLabelOption & LABEL_OPTION_ALIGN_LEFT_OF_CENTER) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_ALIGN_LEFT_OF_CENTER) != 0;
|
||||
}
|
||||
|
||||
public boolean hasPopupHint() {
|
||||
return (mLabelOption & LABEL_OPTION_HAS_POPUP_HINT) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_HAS_POPUP_HINT) != 0;
|
||||
}
|
||||
|
||||
public void setNeedsSpecialPopupHint(boolean needsSpecialPopupHint) {
|
||||
|
@ -368,27 +375,23 @@ public class Key {
|
|||
}
|
||||
|
||||
public boolean hasUppercaseLetter() {
|
||||
return (mLabelOption & LABEL_OPTION_HAS_UPPERCASE_LETTER) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_HAS_UPPERCASE_LETTER) != 0;
|
||||
}
|
||||
|
||||
public boolean hasHintLabel() {
|
||||
return (mLabelOption & LABEL_OPTION_HAS_HINT_LABEL) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_HAS_HINT_LABEL) != 0;
|
||||
}
|
||||
|
||||
public boolean hasLabelWithIconLeft() {
|
||||
return (mLabelOption & LABEL_OPTION_WITH_ICON_LEFT) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_WITH_ICON_LEFT) != 0;
|
||||
}
|
||||
|
||||
public boolean hasLabelWithIconRight() {
|
||||
return (mLabelOption & LABEL_OPTION_WITH_ICON_RIGHT) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_WITH_ICON_RIGHT) != 0;
|
||||
}
|
||||
|
||||
public boolean needsXScale() {
|
||||
return (mLabelOption & LABEL_OPTION_AUTO_X_SCALE) != 0;
|
||||
}
|
||||
|
||||
public boolean noKeyPreview() {
|
||||
return (mLabelOption & LABEL_OPTION_NO_KEY_PREVIEW) != 0;
|
||||
return (mLabelFlags & LABEL_FLAGS_AUTO_X_SCALE) != 0;
|
||||
}
|
||||
|
||||
public Drawable getIcon() {
|
||||
|
|
|
@ -647,7 +647,7 @@ public class PointerTracker {
|
|||
|
||||
private void startRepeatKey(int keyIndex) {
|
||||
final Key key = getKey(keyIndex);
|
||||
if (key != null && key.mRepeatable) {
|
||||
if (key != null && key.isRepeatable()) {
|
||||
onRepeatKey(keyIndex);
|
||||
mTimerProxy.startKeyRepeatTimer(sDelayBeforeKeyRepeatStart, keyIndex, this);
|
||||
mIsRepeatableKey = true;
|
||||
|
|
|
@ -40,7 +40,6 @@ public class KeyStyles {
|
|||
public CharSequence getText(TypedArray a, int index);
|
||||
public int getInt(TypedArray a, int index, int defaultValue);
|
||||
public int getFlag(TypedArray a, int index, int defaultValue);
|
||||
public boolean getBoolean(TypedArray a, int index, boolean defaultValue);
|
||||
}
|
||||
|
||||
/* package */ static class EmptyKeyStyle implements KeyStyle {
|
||||
|
@ -68,11 +67,6 @@ public class KeyStyles {
|
|||
return a.getInt(index, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(TypedArray a, int index, boolean defaultValue) {
|
||||
return a.getBoolean(index, defaultValue);
|
||||
}
|
||||
|
||||
protected static CharSequence[] parseTextArray(TypedArray a, int index) {
|
||||
if (!a.hasValue(index))
|
||||
return null;
|
||||
|
@ -151,12 +145,6 @@ public class KeyStyles {
|
|||
return super.getFlag(a, index, defaultValue) | (value != null ? value : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(TypedArray a, int index, boolean defaultValue) {
|
||||
final Boolean value = (Boolean)mAttributes.get(index);
|
||||
return super.getBoolean(a, index, (value != null) ? value : defaultValue);
|
||||
}
|
||||
|
||||
private DeclaredKeyStyle() {
|
||||
super();
|
||||
}
|
||||
|
@ -168,14 +156,13 @@ public class KeyStyles {
|
|||
readText(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
|
||||
readText(keyAttr, R.styleable.Keyboard_Key_keyHintLabel);
|
||||
readTextArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);
|
||||
readFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelOption);
|
||||
readFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags);
|
||||
readInt(keyAttr, R.styleable.Keyboard_Key_keyIcon);
|
||||
readInt(keyAttr, R.styleable.Keyboard_Key_keyIconPreview);
|
||||
readInt(keyAttr, R.styleable.Keyboard_Key_keyIconShifted);
|
||||
readInt(keyAttr, R.styleable.Keyboard_Key_maxMoreKeysColumn);
|
||||
readInt(keyAttr, R.styleable.Keyboard_Key_backgroundType);
|
||||
readBoolean(keyAttr, R.styleable.Keyboard_Key_isRepeatable);
|
||||
readBoolean(keyAttr, R.styleable.Keyboard_Key_enabled);
|
||||
readFlag(keyAttr, R.styleable.Keyboard_Key_keyActionFlags);
|
||||
}
|
||||
|
||||
private void readText(TypedArray a, int index) {
|
||||
|
@ -194,11 +181,6 @@ public class KeyStyles {
|
|||
mAttributes.put(index, a.getInt(index, 0) | (value != null ? value : 0));
|
||||
}
|
||||
|
||||
private void readBoolean(TypedArray a, int index) {
|
||||
if (a.hasValue(index))
|
||||
mAttributes.put(index, a.getBoolean(index, false));
|
||||
}
|
||||
|
||||
private void readTextArray(TypedArray a, int index) {
|
||||
final CharSequence[] value = parseTextArray(a, index);
|
||||
if (value != null)
|
||||
|
|
Loading…
Reference in a new issue