Remove functionalKeyStyle, use backgroundType="functional" instead

Change-Id: I5facf17779cfe50bdc71a3592e851b3f58295a92
main
Tadashi G. Takaoka 2011-09-15 16:29:26 +09:00
parent 3dcb281fb0
commit 85c0ebddce
5 changed files with 43 additions and 55 deletions

View File

@ -21,10 +21,6 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<!-- Base key style for the functional key -->
<key-style
latin:styleName="functionalKeyStyle"
latin:backgroundType="functional" />
<!-- Base key style for the key which may have settings key as popup key --> <!-- Base key style for the key which may have settings key as popup key -->
<switch> <switch>
<case <case
@ -32,14 +28,14 @@
> >
<key-style <key-style
latin:styleName="f2PopupStyle" latin:styleName="f2PopupStyle"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<default> <default>
<key-style <key-style
latin:styleName="f2PopupStyle" latin:styleName="f2PopupStyle"
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="\@icon/3|\@integer/key_settings" latin:moreKeys="\@icon/3|\@integer/key_settings"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</default> </default>
</switch> </switch>
<!-- Functional key styles --> <!-- Functional key styles -->
@ -48,19 +44,19 @@
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyIcon="iconShiftKey" latin:keyIcon="iconShiftKey"
latin:keyIconShifted="iconShiftedShiftKey" latin:keyIconShifted="iconShiftedShiftKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isSticky="true" /> latin:isSticky="true" />
<key-style <key-style
latin:styleName="deleteKeyStyle" latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete" latin:code="@integer/key_delete"
latin:keyIcon="iconDeleteKey" latin:keyIcon="iconDeleteKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isRepeatable="true" /> latin:isRepeatable="true" />
<key-style <key-style
latin:styleName="returnKeyStyle" latin:styleName="returnKeyStyle"
latin:code="@integer/key_return" latin:code="@integer/key_return"
latin:keyIcon="iconReturnKey" latin:keyIcon="iconReturnKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" /> latin:code="@integer/key_space" />
@ -85,33 +81,33 @@
latin:code="@integer/key_settings" latin:code="@integer/key_settings"
latin:keyIcon="iconSettingsKey" latin:keyIcon="iconSettingsKey"
latin:keyIconPreview="iconPreviewSettingsKey" latin:keyIconPreview="iconPreviewSettingsKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"
latin:keyIcon="iconTabKey" latin:keyIcon="iconTabKey"
latin:keyIconPreview="iconPreviewTabKey" latin:keyIconPreview="iconPreviewTabKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toSymbolKeyStyle" latin:styleName="toSymbolKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toAlphaKeyStyle" latin:styleName="toAlphaKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_alpha_key" latin:keyLabel="@string/label_to_alpha_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toMoreSymbolKeyStyle" latin:styleName="toMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_more_symbol_for_tablet_key" latin:keyLabel="@string/label_to_more_symbol_for_tablet_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="backFromMoreSymbolKeyStyle" latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="comKeyStyle" latin:styleName="comKeyStyle"
latin:keyLabel="@string/keylabel_for_popular_domain" latin:keyLabel="@string/keylabel_for_popular_domain"

View File

@ -21,28 +21,24 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<!-- Functional key styles -->
<key-style
latin:styleName="functionalKeyStyle"
latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="shiftKeyStyle" latin:styleName="shiftKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyIcon="iconShiftKey" latin:keyIcon="iconShiftKey"
latin:keyIconShifted="iconShiftedShiftKey" latin:keyIconShifted="iconShiftedShiftKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isSticky="true" /> latin:isSticky="true" />
<key-style <key-style
latin:styleName="deleteKeyStyle" latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete" latin:code="@integer/key_delete"
latin:keyIcon="iconDeleteKey" latin:keyIcon="iconDeleteKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isRepeatable="true" /> latin:isRepeatable="true" />
<key-style <key-style
latin:styleName="returnKeyStyle" latin:styleName="returnKeyStyle"
latin:code="@integer/key_return" latin:code="@integer/key_return"
latin:keyIcon="iconReturnKey" latin:keyIcon="iconReturnKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" /> latin:code="@integer/key_space" />
@ -61,43 +57,43 @@
latin:code="@integer/key_settings" latin:code="@integer/key_settings"
latin:keyIcon="iconSettingsKey" latin:keyIcon="iconSettingsKey"
latin:keyIconPreview="iconPreviewSettingsKey" latin:keyIconPreview="iconPreviewSettingsKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="shortcutKeyStyle" latin:styleName="shortcutKeyStyle"
latin:code="@integer/key_shortcut" latin:code="@integer/key_shortcut"
latin:keyIcon="iconShortcutKey" latin:keyIcon="iconShortcutKey"
latin:keyIconPreview="iconPreviewShortcutKey" latin:keyIconPreview="iconPreviewShortcutKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"
latin:keyLabel="@string/label_tab_key" latin:keyLabel="@string/label_tab_key"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toSymbolKeyStyle" latin:styleName="toSymbolKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toAlphaKeyStyle" latin:styleName="toAlphaKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_alpha_key" latin:keyLabel="@string/label_to_alpha_key"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toMoreSymbolKeyStyle" latin:styleName="toMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_more_symbol_for_tablet_key" latin:keyLabel="@string/label_to_more_symbol_for_tablet_key"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="backFromMoreSymbolKeyStyle" latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:keyLabelOption="fontNormal" latin:keyLabelOption="fontNormal"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="comKeyStyle" latin:styleName="comKeyStyle"
latin:keyLabel="@string/keylabel_for_popular_domain" latin:keyLabel="@string/keylabel_for_popular_domain"

View File

@ -21,10 +21,6 @@
<merge <merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
> >
<!-- Base key style for the functional key -->
<key-style
latin:styleName="functionalKeyStyle"
latin:backgroundType="functional" />
<!-- Base key style for the key which may have settings or tab key as popup key. --> <!-- Base key style for the key which may have settings or tab key as popup key. -->
<switch> <switch>
<case <case
@ -34,7 +30,7 @@
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1" latin:moreKeys="@string/more_keys_for_f1"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<!-- clobberSettingsKey="false --> <!-- clobberSettingsKey="false -->
<case <case
@ -44,7 +40,7 @@
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_settings" latin:moreKeys="@string/more_keys_for_f1_settings"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<!-- clobberSettingsKey="false" hasSettingsKey="true" --> <!-- clobberSettingsKey="false" hasSettingsKey="true" -->
<case <case
@ -54,7 +50,7 @@
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1_navigate" latin:moreKeys="@string/more_keys_for_f1_navigate"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" --> <!-- clobberSettingsKey="false" and hasSettingsKey="true" navigateAction="false" -->
<default> <default>
@ -62,7 +58,7 @@
latin:styleName="f1PopupStyle" latin:styleName="f1PopupStyle"
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_f1" latin:moreKeys="@string/more_keys_for_f1"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</default> </default>
</switch> </switch>
<!-- Functional key styles --> <!-- Functional key styles -->
@ -71,13 +67,13 @@
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyIcon="iconShiftKey" latin:keyIcon="iconShiftKey"
latin:keyIconShifted="iconShiftedShiftKey" latin:keyIconShifted="iconShiftedShiftKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isSticky="true" /> latin:isSticky="true" />
<key-style <key-style
latin:styleName="deleteKeyStyle" latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete" latin:code="@integer/key_delete"
latin:keyIcon="iconDeleteKey" latin:keyIcon="iconDeleteKey"
latin:parentStyle="functionalKeyStyle" latin:backgroundType="functional"
latin:isRepeatable="true" /> latin:isRepeatable="true" />
<!-- Return key style --> <!-- Return key style -->
<switch> <switch>
@ -92,7 +88,7 @@
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_smiley" latin:moreKeys="@string/more_keys_for_smiley"
latin:maxMoreKeysColumn="5" latin:maxMoreKeysColumn="5"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<case <case
latin:imeAction="actionGo" latin:imeAction="actionGo"
@ -148,13 +144,13 @@
latin:styleName="returnKeyStyle" latin:styleName="returnKeyStyle"
latin:code="@integer/key_return" latin:code="@integer/key_return"
latin:keyIcon="iconReturnKey" latin:keyIcon="iconReturnKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</default> </default>
</switch> </switch>
<key-style <key-style
latin:styleName="spaceKeyStyle" latin:styleName="spaceKeyStyle"
latin:code="@integer/key_space" latin:code="@integer/key_space"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="shortcutKeyStyle" latin:styleName="shortcutKeyStyle"
latin:code="@integer/key_shortcut" latin:code="@integer/key_shortcut"
@ -166,13 +162,13 @@
latin:code="@integer/key_settings" latin:code="@integer/key_settings"
latin:keyIcon="iconSettingsKey" latin:keyIcon="iconSettingsKey"
latin:keyIconPreview="iconPreviewSettingsKey" latin:keyIconPreview="iconPreviewSettingsKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="tabKeyStyle" latin:styleName="tabKeyStyle"
latin:code="@integer/key_tab" latin:code="@integer/key_tab"
latin:keyIcon="iconTabKey" latin:keyIcon="iconTabKey"
latin:keyIconPreview="iconPreviewTabKey" latin:keyIconPreview="iconPreviewTabKey"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<!-- Note: This key style is not for functional tab key. This is used for the tab key which is <!-- Note: This key style is not for functional tab key. This is used for the tab key which is
laid out as normal letter key. --> laid out as normal letter key. -->
<key-style <key-style
@ -194,31 +190,31 @@
latin:keyIcon="iconShortcutForLabel" latin:keyIcon="iconShortcutForLabel"
latin:keyLabel="@string/label_to_symbol_with_microphone_key" latin:keyLabel="@string/label_to_symbol_with_microphone_key"
latin:keyLabelOption="withIconRight" latin:keyLabelOption="withIconRight"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</case> </case>
<default> <default>
<key-style <key-style
latin:styleName="toSymbolKeyStyle" latin:styleName="toSymbolKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</default> </default>
</switch> </switch>
<key-style <key-style
latin:styleName="toAlphaKeyStyle" latin:styleName="toAlphaKeyStyle"
latin:code="@integer/key_switch_alpha_symbol" latin:code="@integer/key_switch_alpha_symbol"
latin:keyLabel="@string/label_to_alpha_key" latin:keyLabel="@string/label_to_alpha_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="toMoreSymbolKeyStyle" latin:styleName="toMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_more_symbol_key" latin:keyLabel="@string/label_to_more_symbol_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="backFromMoreSymbolKeyStyle" latin:styleName="backFromMoreSymbolKeyStyle"
latin:code="@integer/key_shift" latin:code="@integer/key_shift"
latin:keyLabel="@string/label_to_symbol_key" latin:keyLabel="@string/label_to_symbol_key"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="punctuationKeyStyle" latin:styleName="punctuationKeyStyle"
latin:keyLabel="." latin:keyLabel="."
@ -226,5 +222,5 @@
latin:keyLabelOption="hasPopupHint" latin:keyLabelOption="hasPopupHint"
latin:moreKeys="@string/more_keys_for_punctuation" latin:moreKeys="@string/more_keys_for_punctuation"
latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation" latin:maxMoreKeysColumn="@integer/mini_keyboard_column_for_punctuation"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
</merge> </merge>

View File

@ -30,7 +30,7 @@
<key-style <key-style
latin:styleName="numFunctionalKeyStyle" latin:styleName="numFunctionalKeyStyle"
latin:keyLabelOption="largeLetter|followKeyLetterRatio" latin:keyLabelOption="largeLetter|followKeyLetterRatio"
latin:parentStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<key-style <key-style
latin:styleName="numberKeyStyle" latin:styleName="numberKeyStyle"
latin:keyLabelOption="alignLeftOfCenter|hasHintLabel" latin:keyLabelOption="alignLeftOfCenter|hasHintLabel"

View File

@ -37,13 +37,13 @@
<!-- latin:moreKeys="‟" --> <!-- latin:moreKeys="‟" -->
<Key <Key
latin:keyLabel="„" latin:keyLabel="„"
latin:keyStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="50%p" /> latin:keyWidth="50%p" />
<Key <Key
latin:keyLabel="…" latin:keyLabel="…"
latin:keyStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />
@ -61,14 +61,14 @@
<Key <Key
latin:keyLabel="„" latin:keyLabel="„"
latin:keyWidth="9.2%p" latin:keyWidth="9.2%p"
latin:keyStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" /> latin:keyWidth="35.83%p" />
<Key <Key
latin:keyLabel="…" latin:keyLabel="…"
latin:keyWidth="9.2%p" latin:keyWidth="9.2%p"
latin:keyStyle="functionalKeyStyle" /> latin:backgroundType="functional" />
<Key <Key
latin:keyStyle="returnKeyStyle" latin:keyStyle="returnKeyStyle"
latin:keyWidth="fillRight" /> latin:keyWidth="fillRight" />