Home | History | Annotate | Download | only in xml
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 /*
      4 **
      5 ** Copyright 2012, 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     <!-- Navigate more keys style -->
     25     <include latin:keyboardLayout="@xml/key_styles_navigate_more_keys" />
     26     <switch>
     27         <!-- latin:passwordInput="true" -->
     28         <case
     29             latin:imeAction="actionNext"
     30             latin:navigatePrevious="true"
     31             latin:passwordInput="true"
     32         >
     33             <key-style
     34                 latin:styleName="navigateMoreKeysStyle"
     35                 latin:parentStyle="navigatePreviousMoreKeysStyle" />
     36         </case>
     37         <case
     38             latin:imeAction="actionNext"
     39             latin:passwordInput="true"
     40         >
     41             <key-style
     42                 latin:styleName="navigateMoreKeysStyle" />
     43         </case>
     44         <case
     45             latin:imeAction="actionPrevious"
     46             latin:navigateNext="true"
     47             latin:passwordInput="true"
     48         >
     49             <key-style
     50                 latin:styleName="navigateMoreKeysStyle"
     51                 latin:parentStyle="navigateNextMoreKeysStyle" />
     52         </case>
     53         <case
     54             latin:imeAction="actionPrevious"
     55             latin:passwordInput="true"
     56         >
     57             <key-style
     58                 latin:styleName="navigateMoreKeysStyle" />
     59         </case>
     60         <case
     61             latin:navigateNext="true"
     62             latin:navigatePrevious="true"
     63             latin:passwordInput="true"
     64         >
     65             <key-style
     66                 latin:styleName="navigateMoreKeysStyle"
     67                 latin:parentStyle="navigatePreviousNextMoreKeysStyle" />
     68         </case>
     69         <case
     70             latin:navigateNext="true"
     71             latin:passwordInput="true"
     72         >
     73             <key-style
     74                 latin:styleName="navigateMoreKeysStyle"
     75                 latin:parentStyle="navigateNextMoreKeysStyle" />
     76         </case>
     77         <case
     78             latin:navigatePrevious="true"
     79             latin:passwordInput="true"
     80         >
     81             <key-style
     82                 latin:styleName="navigateMoreKeysStyle"
     83                 latin:parentStyle="navigatePreviousMoreKeysStyle" />
     84         </case>
     85         <case
     86             latin:passwordInput="true"
     87         >
     88             <key-style
     89                 latin:styleName="navigateMoreKeysStyle" />
     90         </case>
     91         <!-- latin:mode="email|url|phone|number|date|time|datetime" -->
     92         <case
     93             latin:imeAction="actionNext"
     94             latin:navigatePrevious="true"
     95             latin:mode="email|url|phone|number|date|time|datetime"
     96         >
     97             <key-style
     98                 latin:styleName="navigateMoreKeysStyle"
     99                 latin:parentStyle="navigatePreviousMoreKeysStyle" />
    100         </case>
    101         <case
    102             latin:imeAction="actionNext"
    103             latin:mode="email|url|phone|number|date|time|datetime"
    104         >
    105             <key-style
    106                 latin:styleName="navigateMoreKeysStyle" />
    107         </case>
    108         <case
    109             latin:imeAction="actionPrevious"
    110             latin:navigateNext="true"
    111             latin:mode="email|url|phone|number|date|time|datetime"
    112         >
    113             <key-style
    114                 latin:styleName="navigateMoreKeysStyle"
    115                 latin:parentStyle="navigateNextMoreKeysStyle" />
    116         </case>
    117         <case
    118             latin:imeAction="actionPrevious"
    119             latin:mode="email|url|phone|number|date|time|datetime"
    120         >
    121             <key-style
    122                 latin:styleName="navigateMoreKeysStyle" />
    123         </case>
    124         <case
    125             latin:navigateNext="true"
    126             latin:navigatePrevious="true"
    127             latin:mode="email|url|phone|number|date|time|datetime"
    128         >
    129             <key-style
    130                 latin:styleName="navigateMoreKeysStyle"
    131                 latin:parentStyle="navigatePreviousNextMoreKeysStyle" />
    132         </case>
    133         <case
    134             latin:navigateNext="true"
    135             latin:mode="email|url|phone|number|date|time|datetime"
    136         >
    137             <key-style
    138                 latin:styleName="navigateMoreKeysStyle"
    139                 latin:parentStyle="navigateNextMoreKeysStyle" />
    140         </case>
    141         <case
    142             latin:navigatePrevious="true"
    143             latin:mode="email|url|phone|number|date|time|datetime"
    144         >
    145             <key-style
    146                 latin:styleName="navigateMoreKeysStyle"
    147                 latin:parentStyle="navigatePreviousMoreKeysStyle" />
    148         </case>
    149         <case
    150             latin:mode="email|url|phone|number|date|time|datetime"
    151         >
    152             <key-style
    153                 latin:styleName="navigateMoreKeysStyle" />
    154         </case>
    155         <!-- default -->
    156         <case
    157             latin:imeAction="actionNext"
    158             latin:navigatePrevious="true"
    159         >
    160             <key-style
    161                 latin:styleName="navigateMoreKeysStyle"
    162                 latin:parentStyle="navigateEmojiPreviousMoreKeysStyle" />
    163         </case>
    164         <case
    165             latin:imeAction="actionNext"
    166         >
    167             <key-style
    168                 latin:styleName="navigateMoreKeysStyle"
    169                 latin:parentStyle="navigateEmojiMoreKeysStyle" />
    170         </case>
    171         <case
    172             latin:imeAction="actionPrevious"
    173             latin:navigateNext="true"
    174         >
    175             <key-style
    176                 latin:styleName="navigateMoreKeysStyle"
    177                 latin:parentStyle="navigateEmojiNextMoreKeysStyle" />
    178         </case>
    179         <case
    180             latin:imeAction="actionPrevious"
    181         >
    182             <key-style
    183                 latin:styleName="navigateMoreKeysStyle"
    184                 latin:parentStyle="navigateEmojiMoreKeysStyle" />
    185         </case>
    186         <case
    187             latin:navigateNext="true"
    188             latin:navigatePrevious="true"
    189         >
    190             <key-style
    191                 latin:styleName="navigateMoreKeysStyle"
    192                 latin:parentStyle="navigateEmojiPreviousNextMoreKeysStyle" />
    193         </case>
    194         <case
    195             latin:navigateNext="true"
    196         >
    197             <key-style
    198                 latin:styleName="navigateMoreKeysStyle"
    199                 latin:parentStyle="navigateEmojiNextMoreKeysStyle" />
    200         </case>
    201         <case
    202             latin:navigatePrevious="true"
    203         >
    204             <key-style
    205                 latin:styleName="navigateMoreKeysStyle"
    206                 latin:parentStyle="navigateEmojiPreviousMoreKeysStyle" />
    207         </case>
    208         <default>
    209             <key-style
    210                 latin:styleName="navigateMoreKeysStyle"
    211                 latin:parentStyle="navigateEmojiMoreKeysStyle" />
    212         </default>
    213     </switch>
    214     <!-- Enter key style -->
    215     <switch>
    216         <case latin:keyboardTheme="ICS|KLP">
    217             <key-style
    218                 latin:styleName="defaultEnterKeyStyle"
    219                 latin:keySpec="!icon/enter_key|!code/key_enter"
    220                 latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio|followFunctionalTextColor"
    221                 latin:keyActionFlags="noKeyPreview"
    222                 latin:backgroundType="action"
    223                 latin:parentStyle="navigateMoreKeysStyle" />
    224         </case>
    225         <!-- keyboardTheme="LXXLight|LXXDark" -->
    226         <default>
    227             <key-style
    228                 latin:styleName="defaultEnterKeyStyle"
    229                 latin:keySpec="!icon/enter_key|!code/key_enter"
    230                 latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio|followFunctionalTextColor|keepBackgroundAspectRatio"
    231                 latin:keyActionFlags="noKeyPreview"
    232                 latin:backgroundType="action"
    233                 latin:parentStyle="navigateMoreKeysStyle" />
    234         </default>
    235     </switch>
    236     <include latin:keyboardLayout="@xml/key_styles_actions" />
    237     <switch>
    238         <!-- Shift + Enter in textMultiLine field. -->
    239         <case
    240             latin:isMultiLine="true"
    241             latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
    242         >
    243             <key-style
    244                 latin:styleName="enterKeyStyle"
    245                 latin:keySpec="!icon/enter_key|!code/key_shift_enter"
    246                 latin:parentStyle="defaultEnterKeyStyle" />
    247         </case>
    248         <!-- Smiley in textShortMessage field.
    249              This <case> should be after Shift + Enter <case> and before any of action <case>. -->
    250         <case
    251             latin:mode="im"
    252         >
    253             <key-style
    254                 latin:styleName="enterKeyStyle"
    255                 latin:parentStyle="emojiKeyStyle" />
    256         </case>
    257         <case
    258             latin:imeAction="actionGo"
    259         >
    260             <key-style
    261                 latin:styleName="enterKeyStyle"
    262                 latin:parentStyle="goActionKeyStyle" />
    263         </case>
    264         <case
    265             latin:imeAction="actionNext"
    266         >
    267             <key-style
    268                 latin:styleName="enterKeyStyle"
    269                 latin:parentStyle="nextActionKeyStyle" />
    270         </case>
    271         <case
    272             latin:imeAction="actionPrevious"
    273         >
    274             <key-style
    275                 latin:styleName="enterKeyStyle"
    276                 latin:parentStyle="previousActionKeyStyle" />
    277         </case>
    278         <case
    279             latin:imeAction="actionDone"
    280         >
    281             <key-style
    282                 latin:styleName="enterKeyStyle"
    283                 latin:parentStyle="doneActionKeyStyle" />
    284         </case>
    285         <case
    286             latin:imeAction="actionSend"
    287         >
    288             <key-style
    289                 latin:styleName="enterKeyStyle"
    290                 latin:parentStyle="sendActionKeyStyle" />
    291         </case>
    292         <case
    293             latin:imeAction="actionSearch"
    294         >
    295             <key-style
    296                 latin:styleName="enterKeyStyle"
    297                 latin:parentStyle="searchActionKeyStyle" />
    298         </case>
    299         <case
    300             latin:imeAction="actionCustomLabel"
    301         >
    302             <key-style
    303                 latin:styleName="enterKeyStyle"
    304                 latin:parentStyle="customLabelActionKeyStyle" />
    305         </case>
    306         <!-- imeAction is either actionNone or actionUnspecified. -->
    307         <default>
    308             <key-style
    309                 latin:styleName="enterKeyStyle"
    310                 latin:parentStyle="defaultEnterKeyStyle" />
    311         </default>
    312     </switch>
    313 </merge>
    314