Show Emoji key by longpressing the enter key

Bug: 11074625
Change-Id: I5fc57a2b68d7dcfb8dbebf5821b76b0895a947f9
This commit is contained in:
Satoshi Kataoka 2013-10-07 15:59:41 +09:00
parent 4deb824f3a
commit 32cf6f85a2
2 changed files with 86 additions and 21 deletions

View file

@ -413,7 +413,6 @@
</attr>
<attr name="navigateNext" format="boolean" />
<attr name="navigatePrevious" format="boolean" />
<attr name="navigateEmoji" format="boolean" />
<attr name="passwordInput" format="boolean" />
<attr name="clobberSettingsKey" format="boolean" />
<attr name="shortcutKeyEnabled" format="boolean" />

View file

@ -21,13 +21,14 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<!-- TODO: Stop using many conditional cases for emoji_key_as_more_key. There are way too many to maintain. -->
<!-- Navigate more keys style -->
<switch>
<!-- navigateEmoji="false" -->
<!-- latin:passwordInput="true" -->
<case
latin:imeAction="actionNext"
latin:navigatePrevious="true"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -37,7 +38,7 @@
<case
latin:imeAction="actionNext"
latin:navigatePrevious="false"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
@ -45,7 +46,7 @@
<case
latin:imeAction="actionPrevious"
latin:navigateNext="true"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -55,16 +56,15 @@
<case
latin:imeAction="actionPrevious"
latin:navigateNext="false"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
</case>
<!-- imeAction!="actionNext" and imeAction!="actionPrevious" -->
<case
latin:navigateNext="true"
latin:navigatePrevious="true"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -74,7 +74,7 @@
<case
latin:navigateNext="true"
latin:navigatePrevious="false"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -84,7 +84,7 @@
<case
latin:navigateNext="false"
latin:navigatePrevious="true"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -94,16 +94,90 @@
<case
latin:navigateNext="false"
latin:navigatePrevious="false"
latin:navigateEmoji="false"
latin:passwordInput="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
</case>
<!-- navigateEmoji="true" -->
<!-- latin:mode="email|url|phone|number|date|time|datetime" -->
<case
latin:imeAction="actionNext"
latin:navigatePrevious="true"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/action_previous_as_more_key" />
</case>
<case
latin:imeAction="actionNext"
latin:navigatePrevious="false"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
</case>
<case
latin:imeAction="actionPrevious"
latin:navigateNext="true"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/action_next_as_more_key" />
</case>
<case
latin:imeAction="actionPrevious"
latin:navigateNext="false"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
</case>
<case
latin:navigateNext="true"
latin:navigatePrevious="true"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/action_previous_as_more_key,!text/action_next_as_more_key" />
</case>
<case
latin:navigateNext="true"
latin:navigatePrevious="false"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/action_next_as_more_key" />
</case>
<case
latin:navigateNext="false"
latin:navigatePrevious="true"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/action_previous_as_more_key" />
</case>
<case
latin:navigateNext="false"
latin:navigatePrevious="false"
latin:mode="email|url|phone|number|date|time|datetime"
>
<key-style
latin:styleName="navigateMoreKeysStyle" />
</case>
<!-- default -->
<case
latin:imeAction="actionNext"
latin:navigatePrevious="true"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -113,7 +187,6 @@
<case
latin:imeAction="actionNext"
latin:navigatePrevious="false"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -122,7 +195,6 @@
<case
latin:imeAction="actionPrevious"
latin:navigateNext="true"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -132,17 +204,14 @@
<case
latin:imeAction="actionPrevious"
latin:navigateNext="false"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:moreKeys="!text/emoji_key_as_more_key" />
</case>
<!-- imeAction!="actionNext" and imeAction!="actionPrevious" -->
<case
latin:navigateNext="true"
latin:navigatePrevious="true"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -152,7 +221,6 @@
<case
latin:navigateNext="true"
latin:navigatePrevious="false"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -162,7 +230,6 @@
<case
latin:navigateNext="false"
latin:navigatePrevious="true"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"
@ -172,7 +239,6 @@
<case
latin:navigateNext="false"
latin:navigatePrevious="false"
latin:navigateEmoji="true"
>
<key-style
latin:styleName="navigateMoreKeysStyle"