Home | History | Annotate | Download | only in xml-sw600dp
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 /*
      4 **
      5 ** Copyright 2013, The Android Open Source Project
      6 **
      7 ** Licensed under the Apache License, Version 2.0 (the "License");
      8 ** you may not use this file except in compliance with the License.
      9 ** You may obtain a copy of the License at
     10 **
     11 **     http://www.apache.org/licenses/LICENSE-2.0
     12 **
     13 ** Unless required by applicable law or agreed to in writing, software
     14 ** distributed under the License is distributed on an "AS IS" BASIS,
     15 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 ** See the License for the specific language governing permissions and
     17 ** limitations under the License.
     18 */
     19 -->
     20 
     21 <merge
     22     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
     23 >
     24     <!-- TODO: Stop using many conditional cases for emoji_key_as_more_key. There are way too many to maintain. -->
     25     <!-- Navigate more keys style -->
     26     <switch>
     27         <!-- latin:passwordInput="true" -->
     28         <case
     29             latin:imeAction="actionNext"
     30             latin:navigatePrevious="true"
     31         >
     32             <key-style
     33                 latin:styleName="navigateMoreKeysStyle"
     34                 latin:keyLabelFlags="hasPopupHint|preserveCase"
     35                 latin:moreKeys="!text/action_previous_as_more_key" />
     36         </case>
     37         <case
     38             latin:imeAction="actionNext"
     39             latin:navigatePrevious="false"
     40         >
     41             <key-style
     42                 latin:styleName="navigateMoreKeysStyle" />
     43         </case>
     44         <case
     45             latin:imeAction="actionPrevious"
     46             latin:navigateNext="true"
     47         >
     48             <key-style
     49                 latin:styleName="navigateMoreKeysStyle"
     50                 latin:keyLabelFlags="hasPopupHint|preserveCase"
     51                 latin:moreKeys="!text/action_next_as_more_key" />
     52         </case>
     53         <case
     54             latin:imeAction="actionPrevious"
     55             latin:navigateNext="false"
     56         >
     57             <key-style
     58                 latin:styleName="navigateMoreKeysStyle" />
     59         </case>
     60         <case
     61             latin:navigateNext="true"
     62             latin:navigatePrevious="true"
     63         >
     64             <key-style
     65                 latin:styleName="navigateMoreKeysStyle"
     66                 latin:keyLabelFlags="hasPopupHint|preserveCase"
     67                 latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/action_previous_as_more_key,!text/action_next_as_more_key" />
     68         </case>
     69         <case
     70             latin:navigateNext="true"
     71             latin:navigatePrevious="false"
     72         >
     73             <key-style
     74                 latin:styleName="navigateMoreKeysStyle"
     75                 latin:keyLabelFlags="hasPopupHint|preserveCase"
     76                 latin:moreKeys="!text/action_next_as_more_key" />
     77         </case>
     78         <case
     79             latin:navigateNext="false"
     80             latin:navigatePrevious="true"
     81         >
     82             <key-style
     83                 latin:styleName="navigateMoreKeysStyle"
     84                 latin:keyLabelFlags="hasPopupHint|preserveCase"
     85                 latin:moreKeys="!text/action_previous_as_more_key" />
     86         </case>
     87         <case
     88             latin:navigateNext="false"
     89             latin:navigatePrevious="false"
     90         >
     91             <key-style
     92                 latin:styleName="navigateMoreKeysStyle" />
     93         </case>
     94         <default>
     95             <key-style
     96                 latin:styleName="navigateMoreKeysStyle" />
     97         </default>
     98     </switch>
     99     <!-- Enter key style -->
    100     <key-style
    101         latin:styleName="defaultEnterKeyStyle"
    102         latin:code="!code/key_enter"
    103         latin:keyIcon="!icon/enter_key"
    104         latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio"
    105         latin:keyActionFlags="noKeyPreview"
    106         latin:backgroundType="functional"
    107         latin:parentStyle="navigateMoreKeysStyle" />
    108     <key-style
    109         latin:styleName="shiftEnterKeyStyle"
    110         latin:code="!code/key_shift_enter"
    111         latin:parentStyle="defaultEnterKeyStyle" />
    112     <key-style
    113         latin:styleName="defaultActionEnterKeyStyle"
    114         latin:code="!code/key_enter"
    115         latin:keyIcon="!icon/undefined"
    116         latin:backgroundType="action"
    117         latin:parentStyle="defaultEnterKeyStyle" />
    118     <switch>
    119         <!-- Shift + Enter in textMultiLine field. -->
    120         <case
    121             latin:isMultiLine="true"
    122             latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
    123         >
    124             <key-style
    125                 latin:styleName="enterKeyStyle"
    126                 latin:parentStyle="shiftEnterKeyStyle" />
    127         </case>
    128         <case
    129             latin:imeAction="actionGo"
    130         >
    131             <key-style
    132                 latin:styleName="enterKeyStyle"
    133                 latin:keyLabel="!text/label_go_key"
    134                 latin:parentStyle="defaultActionEnterKeyStyle" />
    135         </case>
    136         <case
    137             latin:imeAction="actionNext"
    138         >
    139             <key-style
    140                 latin:styleName="enterKeyStyle"
    141                 latin:keyLabel="!text/label_next_key"
    142                 latin:parentStyle="defaultActionEnterKeyStyle" />
    143         </case>
    144         <case
    145             latin:imeAction="actionPrevious"
    146         >
    147             <key-style
    148                 latin:styleName="enterKeyStyle"
    149                 latin:keyLabel="!text/label_previous_key"
    150                 latin:parentStyle="defaultActionEnterKeyStyle" />
    151         </case>
    152         <case
    153             latin:imeAction="actionDone"
    154         >
    155             <key-style
    156                 latin:styleName="enterKeyStyle"
    157                 latin:keyLabel="!text/label_done_key"
    158                 latin:parentStyle="defaultActionEnterKeyStyle" />
    159         </case>
    160         <case
    161             latin:imeAction="actionSend"
    162         >
    163             <key-style
    164                 latin:styleName="enterKeyStyle"
    165                 latin:keyLabel="!text/label_send_key"
    166                 latin:parentStyle="defaultActionEnterKeyStyle" />
    167         </case>
    168         <case
    169             latin:imeAction="actionSearch"
    170         >
    171             <key-style
    172                 latin:styleName="enterKeyStyle"
    173                 latin:keyIcon="!icon/search_key"
    174                 latin:parentStyle="defaultActionEnterKeyStyle" />
    175         </case>
    176         <case
    177             latin:imeAction="actionCustomLabel"
    178         >
    179             <key-style
    180                 latin:styleName="enterKeyStyle"
    181                 latin:keyLabelFlags="fromCustomActionLabel"
    182                 latin:parentStyle="defaultActionEnterKeyStyle" />
    183         </case>
    184         <!-- imeAction is either actionNone or actionUnspecified. -->
    185         <default>
    186             <key-style
    187                 latin:styleName="enterKeyStyle"
    188                 latin:parentStyle="defaultEnterKeyStyle" />
    189         </default>
    190     </switch>
    191 </merge>
    192