aboutsummaryrefslogtreecommitdiffstats
path: root/java/res/xml
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-09-09 13:05:31 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-09-09 14:28:46 +0900
commit486c4894ce0917fc7b18eaee4bfd031051f2b05b (patch)
tree9aaada10e1f2f9d6e2c4907791844787618a33b2 /java/res/xml
parent9395014e76877fc9ef060a3fe54a9e06f0036d6d (diff)
downloadlatinime-486c4894ce0917fc7b18eaee4bfd031051f2b05b.tar.gz
latinime-486c4894ce0917fc7b18eaee4bfd031051f2b05b.tar.xz
latinime-486c4894ce0917fc7b18eaee4bfd031051f2b05b.zip
Keep aspect ratio of Material action key background
Bug: 15681452 Change-Id: Ie4b823dca541b76b68cade580845a21ff0b21e2f
Diffstat (limited to 'java/res/xml')
-rw-r--r--java/res/xml/key_styles_common.xml23
-rw-r--r--java/res/xml/key_styles_enter.xml28
2 files changed, 39 insertions, 12 deletions
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index 43ee26b07..b36ddf236 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -80,11 +80,24 @@
latin:keyActionFlags="isRepeatable|noKeyPreview"
latin:backgroundType="functional" />
<!-- emojiKeyStyle must be defined before including @xml/key_syles_enter. -->
- <key-style
- latin:styleName="emojiKeyStyle"
- latin:keySpec="!icon/emoji_action_key|!code/key_emoji"
- latin:keyActionFlags="noKeyPreview"
- latin:backgroundType="action" />
+ <switch>
+ <case latin:keyboardTheme="ICS|KLP">
+ <key-style
+ latin:styleName="emojiKeyStyle"
+ latin:keySpec="!icon/emoji_action_key|!code/key_emoji"
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="action" />
+ </case>
+ <!-- keyboardTheme="LXXLight|LXXDark" -->
+ <default>
+ <key-style
+ latin:styleName="emojiKeyStyle"
+ latin:keySpec="!icon/emoji_action_key|!code/key_emoji"
+ latin:keyLabelFlags="keepBackgroundAspectRatio"
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="action" />
+ </default>
+ </switch>
<include
latin:keyboardLayout="@xml/key_styles_enter" />
<!-- TODO: Currently there is no way to specify icon alignment per theme. -->
diff --git a/java/res/xml/key_styles_enter.xml b/java/res/xml/key_styles_enter.xml
index d6d01b862..564f465e9 100644
--- a/java/res/xml/key_styles_enter.xml
+++ b/java/res/xml/key_styles_enter.xml
@@ -212,13 +212,27 @@
</default>
</switch>
<!-- Enter key style -->
- <key-style
- latin:styleName="defaultEnterKeyStyle"
- latin:keySpec="!icon/enter_key|!code/key_enter"
- latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio|followFunctionalTextColor"
- latin:keyActionFlags="noKeyPreview"
- latin:backgroundType="action"
- latin:parentStyle="navigateMoreKeysStyle" />
+ <switch>
+ <case latin:keyboardTheme="ICS|KLP">
+ <key-style
+ latin:styleName="defaultEnterKeyStyle"
+ latin:keySpec="!icon/enter_key|!code/key_enter"
+ latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio|followFunctionalTextColor"
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="action"
+ latin:parentStyle="navigateMoreKeysStyle" />
+ </case>
+ <!-- keyboardTheme="LXXLight|LXXDark" -->
+ <default>
+ <key-style
+ latin:styleName="defaultEnterKeyStyle"
+ latin:keySpec="!icon/enter_key|!code/key_enter"
+ latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio|followFunctionalTextColor|keepBackgroundAspectRatio"
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="action"
+ latin:parentStyle="navigateMoreKeysStyle" />
+ </default>
+ </switch>
<include latin:keyboardLayout="@xml/key_styles_actions" />
<switch>
<!-- Shift + Enter in textMultiLine field. -->