am 6ba84dcd
: Merge "Refactor action label/icon definitions" into lmp-dev
* commit '6ba84dcd96418a7a568afeaf064aa64cf94a1839': Refactor action label/icon definitions
This commit is contained in:
commit
7f8501867e
7 changed files with 292 additions and 268 deletions
|
@ -22,20 +22,18 @@
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
<!-- Navigate more keys style -->
|
<!-- Navigate more keys style -->
|
||||||
|
<include latin:keyboardLayout="@xml/key_styles_navigate_more_keys" />
|
||||||
<switch>
|
<switch>
|
||||||
<!-- latin:passwordInput="true" -->
|
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
latin:navigatePrevious="true"
|
latin:navigatePrevious="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle" />
|
latin:styleName="navigateMoreKeysStyle" />
|
||||||
|
@ -46,12 +44,10 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
latin:navigateNext="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle" />
|
latin:styleName="navigateMoreKeysStyle" />
|
||||||
|
@ -62,33 +58,21 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="true"
|
latin:navigateNext="true"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="true"
|
latin:navigatePrevious="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="navigateMoreKeysStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<default>
|
<default>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -103,6 +87,7 @@
|
||||||
latin:keyActionFlags="noKeyPreview"
|
latin:keyActionFlags="noKeyPreview"
|
||||||
latin:backgroundType="action"
|
latin:backgroundType="action"
|
||||||
latin:parentStyle="navigateMoreKeysStyle" />
|
latin:parentStyle="navigateMoreKeysStyle" />
|
||||||
|
<include latin:keyboardLayout="@xml/key_styles_actions" />
|
||||||
<switch>
|
<switch>
|
||||||
<!-- Shift + Enter in textMultiLine field. -->
|
<!-- Shift + Enter in textMultiLine field. -->
|
||||||
<case
|
<case
|
||||||
|
@ -116,133 +101,52 @@
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionGo"
|
latin:imeAction="actionGo"
|
||||||
latin:isIconDefined="go_key"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!icon/go_key|!code/key_enter"
|
latin:parentStyle="goActionKeyStyle" />
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionGo"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!text/label_go_key|!code/key_enter"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionNext"
|
|
||||||
latin:isIconDefined="next_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/next_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_next_key|!code/key_enter"
|
latin:parentStyle="nextActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionPrevious"
|
|
||||||
latin:isIconDefined="previous_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/previous_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_previous_key|!code/key_enter"
|
latin:parentStyle="previousActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionDone"
|
|
||||||
latin:isIconDefined="done_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/done_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionDone"
|
latin:imeAction="actionDone"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_done_key|!code/key_enter"
|
latin:parentStyle="doneActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionSend"
|
|
||||||
latin:isIconDefined="send_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/send_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionSend"
|
latin:imeAction="actionSend"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_send_key|!code/key_enter"
|
latin:parentStyle="sendActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionSearch"
|
|
||||||
latin:isIconDefined="search_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/search_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionSearch"
|
latin:imeAction="actionSearch"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_search_key|!code/key_enter"
|
latin:parentStyle="searchActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionCustomLabel"
|
latin:imeAction="actionCustomLabel"
|
||||||
latin:keyboardTheme="ICS|KLP"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="dummy_label|!code/key_enter"
|
latin:parentStyle="customLabelActionKeyStyle" />
|
||||||
latin:keyLabelFlags="fromCustomActionLabel"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionCustomLabel"
|
|
||||||
latin:keyboardTheme="LXXLight|LXXDark"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="dummy_label|!code/key_enter"
|
|
||||||
latin:keyLabelFlags="fromCustomActionLabel"
|
|
||||||
latin:backgroundType="functional"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<!-- imeAction is either actionNone or actionUnspecified. -->
|
<!-- imeAction is either actionNone or actionUnspecified. -->
|
||||||
<default>
|
<default>
|
||||||
|
|
133
java/res/xml/key_styles_actions.xml
Normal file
133
java/res/xml/key_styles_actions.xml
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright 2014, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<merge
|
||||||
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
|
>
|
||||||
|
<!-- Go key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="go_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="goActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/go_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="goActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_go_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<!-- Next key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="next_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="nextActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/next_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="nextActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_next_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<!-- Previous key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="previous_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="previousActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/previous_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="previousActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_previous_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<!-- Done key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="done_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="doneActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/done_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="doneActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_done_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<!-- Send key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="send_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="sendActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/send_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="sendActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_send_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<!-- Seartch key -->
|
||||||
|
<switch>
|
||||||
|
<case latin:isIconDefined="search_key">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="searchActionKeyStyle"
|
||||||
|
latin:keySpec="!icon/search_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="searchActionKeyStyle"
|
||||||
|
latin:keySpec="!text/label_search_key|!code/key_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
<switch>
|
||||||
|
<case latin:keyboardTheme="ICS|KLP">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="customLabelActionKeyStyle"
|
||||||
|
latin:keySpec="dummy_label|!code/key_enter"
|
||||||
|
latin:keyLabelFlags="fromCustomActionLabel"
|
||||||
|
latin:backgroundType="action"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<!-- keyboardTheme="LXXLight|LXXDark" -->
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="customLabelActionKeyStyle"
|
||||||
|
latin:keySpec="dummy_label|!code/key_enter"
|
||||||
|
latin:keyLabelFlags="fromCustomActionLabel"
|
||||||
|
latin:backgroundType="functional"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
</merge>
|
|
@ -21,8 +21,8 @@
|
||||||
<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"
|
||||||
>
|
>
|
||||||
<!-- TODO: Stop using many conditional cases for keyspec_emoji_action_key. There are way too many to maintain. -->
|
|
||||||
<!-- Navigate more keys style -->
|
<!-- Navigate more keys style -->
|
||||||
|
<include latin:keyboardLayout="@xml/key_styles_navigate_more_keys" />
|
||||||
<switch>
|
<switch>
|
||||||
<!-- latin:passwordInput="true" -->
|
<!-- latin:passwordInput="true" -->
|
||||||
<case
|
<case
|
||||||
|
@ -32,12 +32,10 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:passwordInput="true"
|
latin:passwordInput="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -50,12 +48,10 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:passwordInput="true"
|
latin:passwordInput="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -68,32 +64,25 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="true"
|
latin:navigateNext="true"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:passwordInput="true"
|
latin:passwordInput="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="true"
|
latin:navigatePrevious="true"
|
||||||
latin:passwordInput="true"
|
latin:passwordInput="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:passwordInput="true"
|
latin:passwordInput="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -107,12 +96,10 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:mode="email|url|phone|number|date|time|datetime"
|
latin:mode="email|url|phone|number|date|time|datetime"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -125,12 +112,10 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:mode="email|url|phone|number|date|time|datetime"
|
latin:mode="email|url|phone|number|date|time|datetime"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -143,32 +128,25 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="true"
|
latin:navigateNext="true"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:mode="email|url|phone|number|date|time|datetime"
|
latin:mode="email|url|phone|number|date|time|datetime"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="true"
|
latin:navigatePrevious="true"
|
||||||
latin:mode="email|url|phone|number|date|time|datetime"
|
latin:mode="email|url|phone|number|date|time|datetime"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigatePreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="false"
|
|
||||||
latin:mode="email|url|phone|number|date|time|datetime"
|
latin:mode="email|url|phone|number|date|time|datetime"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -181,17 +159,14 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiPreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_previous" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_emoji_action_key" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
|
@ -199,17 +174,14 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
latin:navigateNext="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiMoreKeysStyle" />
|
||||||
latin:moreKeys="!text/keyspec_emoji_action_key" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="true"
|
latin:navigateNext="true"
|
||||||
|
@ -217,39 +189,26 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiPreviousNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!3,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="true"
|
latin:navigateNext="true"
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiNextMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_next" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="true"
|
latin:navigatePrevious="true"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
latin:parentStyle="navigateEmojiPreviousMoreKeysStyle" />
|
||||||
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_previous" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:navigateNext="false"
|
|
||||||
latin:navigatePrevious="false"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="navigateMoreKeysStyle"
|
|
||||||
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
|
||||||
latin:moreKeys="!text/keyspec_emoji_action_key" />
|
|
||||||
</case>
|
</case>
|
||||||
<default>
|
<default>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="navigateMoreKeysStyle" />
|
latin:styleName="navigateMoreKeysStyle"
|
||||||
|
latin:parentStyle="navigateEmojiMoreKeysStyle" />
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
<!-- Enter key style -->
|
<!-- Enter key style -->
|
||||||
|
@ -260,10 +219,7 @@
|
||||||
latin:keyActionFlags="noKeyPreview"
|
latin:keyActionFlags="noKeyPreview"
|
||||||
latin:backgroundType="action"
|
latin:backgroundType="action"
|
||||||
latin:parentStyle="navigateMoreKeysStyle" />
|
latin:parentStyle="navigateMoreKeysStyle" />
|
||||||
<key-style
|
<include latin:keyboardLayout="@xml/key_styles_actions" />
|
||||||
latin:styleName="shiftEnterKeyStyle"
|
|
||||||
latin:keySpec="!icon/enter_key|!code/key_shift_enter"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
<switch>
|
<switch>
|
||||||
<!-- Shift + Enter in textMultiLine field. -->
|
<!-- Shift + Enter in textMultiLine field. -->
|
||||||
<case
|
<case
|
||||||
|
@ -272,7 +228,8 @@
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:parentStyle="shiftEnterKeyStyle" />
|
latin:keySpec="!icon/enter_key|!code/key_shift_enter"
|
||||||
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
</case>
|
</case>
|
||||||
<!-- Smiley in textShortMessage field.
|
<!-- Smiley in textShortMessage field.
|
||||||
This <case> should be after Shift + Enter <case> and before any of action <case>. -->
|
This <case> should be after Shift + Enter <case> and before any of action <case>. -->
|
||||||
|
@ -285,139 +242,57 @@
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionGo"
|
latin:imeAction="actionGo"
|
||||||
latin:isIconDefined="go_key"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!icon/go_key|!code/key_enter"
|
latin:parentStyle="goActionKeyStyle" />
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionGo"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!text/label_go_key|!code/key_enter"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionNext"
|
|
||||||
latin:isIconDefined="next_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/next_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionNext"
|
latin:imeAction="actionNext"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_next_key|!code/key_enter"
|
latin:parentStyle="nextActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionPrevious"
|
|
||||||
latin:isIconDefined="previous_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/previous_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionPrevious"
|
latin:imeAction="actionPrevious"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_previous_key|!code/key_enter"
|
latin:parentStyle="previousActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionDone"
|
|
||||||
latin:isIconDefined="done_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/done_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionDone"
|
latin:imeAction="actionDone"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_done_key|!code/key_enter"
|
latin:parentStyle="doneActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionSend"
|
|
||||||
latin:isIconDefined="send_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/send_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionSend"
|
latin:imeAction="actionSend"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_send_key|!code/key_enter"
|
latin:parentStyle="sendActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionSearch"
|
|
||||||
latin:isIconDefined="search_key"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="!icon/search_key|!code/key_enter"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionSearch"
|
latin:imeAction="actionSearch"
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!text/label_search_key|!code/key_enter"
|
latin:parentStyle="searchActionKeyStyle" />
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<case
|
<case
|
||||||
latin:imeAction="actionCustomLabel"
|
latin:imeAction="actionCustomLabel"
|
||||||
latin:keyboardTheme="ICS|KLP"
|
|
||||||
>
|
>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="dummy_label|!code/key_enter"
|
latin:parentStyle="customLabelActionKeyStyle" />
|
||||||
latin:keyLabelFlags="fromCustomActionLabel"
|
|
||||||
latin:backgroundType="action"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
|
||||||
<case
|
|
||||||
latin:imeAction="actionCustomLabel"
|
|
||||||
latin:keyboardTheme="LXXLight|LXXDark"
|
|
||||||
>
|
|
||||||
<key-style
|
|
||||||
latin:styleName="enterKeyStyle"
|
|
||||||
latin:keySpec="dummy_label|!code/key_enter"
|
|
||||||
latin:keyLabelFlags="fromCustomActionLabel"
|
|
||||||
latin:backgroundType="functional"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
|
||||||
</case>
|
</case>
|
||||||
<!-- imeAction is either actionNone or actionUnspecified. -->
|
<!-- imeAction is either actionNone or actionUnspecified. -->
|
||||||
<default>
|
<default>
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="enterKeyStyle"
|
latin:styleName="enterKeyStyle"
|
||||||
latin:keySpec="!icon/enter_key|!code/key_enter"
|
|
||||||
latin:parentStyle="defaultEnterKeyStyle" />
|
latin:parentStyle="defaultEnterKeyStyle" />
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
|
|
86
java/res/xml/key_styles_navigate_more_keys.xml
Normal file
86
java/res/xml/key_styles_navigate_more_keys.xml
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright 2014, The Android Open Source Project
|
||||||
|
**
|
||||||
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
** you may not use this file except in compliance with the License.
|
||||||
|
** You may obtain a copy of the License at
|
||||||
|
**
|
||||||
|
** http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
**
|
||||||
|
** Unless required by applicable law or agreed to in writing, software
|
||||||
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
** See the License for the specific language governing permissions and
|
||||||
|
** limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<merge
|
||||||
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
|
>
|
||||||
|
<switch>
|
||||||
|
<case latin:keyboardTheme="ICS|KLP">
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!text/keyspec_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigatePreviousMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!text/keyspec_action_previous" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigatePreviousNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!text/keyspec_emoji_action_key" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiPreviousMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_previous" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiPreviousNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!3,!needsDividers!,!text/keyspec_emoji_action_key,!text/keyspec_action_previous,!text/keyspec_action_next" />
|
||||||
|
</case>
|
||||||
|
<default>
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!icon/next_key|!code/key_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigatePreviousMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!icon/previous_key|!code/key_action_previous" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigatePreviousNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!icon/previous_key|!code/key_action_previous,!icon/next_key|!code/key_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!text/keyspec_emoji_action_key" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!icon/next_key|!code/key_action_next" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiPreviousMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/keyspec_emoji_action_key,!icon/previous_key|!code/key_action_previous" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="navigateEmojiPreviousNextMoreKeysStyle"
|
||||||
|
latin:keyLabelFlags="hasPopupHint|preserveCase"
|
||||||
|
latin:moreKeys="!fixedColumnOrder!3,!needsDividers!,!text/keyspec_emoji_action_key,!icon/previous_key|!code/key_action_previous,!icon/next_key|!code/key_action_next" />
|
||||||
|
</default>
|
||||||
|
</switch>
|
||||||
|
</merge>
|
|
@ -35,12 +35,24 @@ abstract class KeyboardLayoutSetNavigateMoreKeysBase extends KeyboardLayoutSetTe
|
||||||
private ExpectedMoreKey mExpectedNavigatePreviousMoreKey;
|
private ExpectedMoreKey mExpectedNavigatePreviousMoreKey;
|
||||||
private ExpectedMoreKey mExpectedEmojiMoreKey;
|
private ExpectedMoreKey mExpectedEmojiMoreKey;
|
||||||
|
|
||||||
|
protected ExpectedMoreKey getExpectedNavigateNextMoreKey() {
|
||||||
|
return new ExpectedMoreKey(R.string.label_next_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ExpectedMoreKey getExpectedNavigatePreviousMoreKey() {
|
||||||
|
return new ExpectedMoreKey(R.string.label_previous_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ExpectedMoreKey getExpectedEmojiMoreKey() {
|
||||||
|
return new ExpectedMoreKey(KeyboardIconsSet.NAME_EMOJI_ACTION_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
mExpectedNavigateNextMoreKey = new ExpectedMoreKey(R.string.label_next_key);
|
mExpectedNavigateNextMoreKey = getExpectedNavigateNextMoreKey();
|
||||||
mExpectedNavigatePreviousMoreKey = new ExpectedMoreKey(R.string.label_previous_key);
|
mExpectedNavigatePreviousMoreKey = getExpectedNavigatePreviousMoreKey();
|
||||||
mExpectedEmojiMoreKey = new ExpectedMoreKey(KeyboardIconsSet.NAME_EMOJI_ACTION_KEY);
|
mExpectedEmojiMoreKey = getExpectedEmojiMoreKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,6 +102,7 @@ abstract class KeyboardLayoutSetNavigateMoreKeysBase extends KeyboardLayoutSetTe
|
||||||
assertEquals(tag + " column",
|
assertEquals(tag + " column",
|
||||||
expectedMoreKeys.length, actualKey.getMoreKeysColumnNumber());
|
expectedMoreKeys.length, actualKey.getMoreKeysColumnNumber());
|
||||||
}
|
}
|
||||||
|
assertNotNull(tag + " moreKeys", actualMoreKeys);
|
||||||
assertEquals(tag, expectedMoreKeys.length, actualMoreKeys.length);
|
assertEquals(tag, expectedMoreKeys.length, actualMoreKeys.length);
|
||||||
for (int index = 0; index < actualMoreKeys.length; index++) {
|
for (int index = 0; index < actualMoreKeys.length; index++) {
|
||||||
final int expectedLabelResId = expectedMoreKeys[index].mLabelResId;
|
final int expectedLabelResId = expectedMoreKeys[index].mLabelResId;
|
||||||
|
|
|
@ -18,6 +18,8 @@ package com.android.inputmethod.keyboard;
|
||||||
|
|
||||||
import android.test.suitebuilder.annotation.SmallTest;
|
import android.test.suitebuilder.annotation.SmallTest;
|
||||||
|
|
||||||
|
import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public class KeyboardLayoutSetNavigateMoreKeysLxxTests
|
public class KeyboardLayoutSetNavigateMoreKeysLxxTests
|
||||||
extends KeyboardLayoutSetNavigateMoreKeysBase {
|
extends KeyboardLayoutSetNavigateMoreKeysBase {
|
||||||
|
@ -25,4 +27,14 @@ public class KeyboardLayoutSetNavigateMoreKeysLxxTests
|
||||||
protected int getKeyboardThemeForTests() {
|
protected int getKeyboardThemeForTests() {
|
||||||
return KeyboardTheme.THEME_ID_LXX_LIGHT;
|
return KeyboardTheme.THEME_ID_LXX_LIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ExpectedMoreKey getExpectedNavigateNextMoreKey() {
|
||||||
|
return new ExpectedMoreKey(KeyboardIconsSet.NAME_NEXT_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ExpectedMoreKey getExpectedNavigatePreviousMoreKey() {
|
||||||
|
return new ExpectedMoreKey(KeyboardIconsSet.NAME_PREVIOUS_KEY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase {
|
||||||
final KeyboardTheme keyboardTheme = KeyboardTheme.searchKeyboardThemeById(
|
final KeyboardTheme keyboardTheme = KeyboardTheme.searchKeyboardThemeById(
|
||||||
getKeyboardThemeForTests());
|
getKeyboardThemeForTests());
|
||||||
setContext(new ContextThemeWrapper(getContext(), keyboardTheme.mStyleId));
|
setContext(new ContextThemeWrapper(getContext(), keyboardTheme.mStyleId));
|
||||||
|
KeyboardLayoutSet.onKeyboardThemeChanged();
|
||||||
|
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
mScreenMetrics = context.getResources().getInteger(R.integer.config_screen_metrics);
|
mScreenMetrics = context.getResources().getInteger(R.integer.config_screen_metrics);
|
||||||
|
|
Loading…
Reference in a new issue