summaryrefslogtreecommitdiffstats
path: root/java/res/values/attrs.xml
blob: a18371fc9b6c6aa342533efb1680136250c2de55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->

<resources>
    <declare-styleable name="KeyboardTheme">
        <!-- Keyboard style -->
        <attr name="keyboardStyle" format="reference" />
        <!-- TODO: Get rid of latinKeyboardStyle -->
        <!-- LatinKeyboard style -->
        <attr name="latinKeyboardStyle" format="reference" />
        <!-- KeyboardView style -->
        <attr name="keyboardViewStyle" format="reference" />
        <!-- LatinKeyboardView style -->
        <attr name="latinKeyboardViewStyle" format="reference" />
        <!-- MoreKeysKeyboard style -->
        <attr name="moreKeysKeyboardStyle" format="reference" />
        <!-- MoreKeysKeyboardView style -->
        <attr name="moreKeysKeyboardViewStyle" format="reference" />
        <attr name="moreKeysKeyboardPanelStyle" format="reference" />
        <!-- Suggestions strip style -->
        <attr name="suggestionsStripBackgroundStyle" format="reference" />
        <attr name="suggestionsViewStyle" format="reference" />
        <attr name="moreSuggestionsViewStyle" format="reference" />
        <attr name="suggestionBackgroundStyle" format="reference" />
        <attr name="suggestionPreviewBackgroundStyle" format="reference" />
    </declare-styleable>

    <declare-styleable name="KeyboardView">
        <!-- Image for the key. This image needs to be a StateListDrawable, with the following
             possible states: normal, pressed, checkable, checkable+pressed, checkable+checked,
             checkable+checked+pressed. -->
        <attr name="keyBackground" format="reference" />

        <!-- Size of the text for one letter keys. If not defined, keyLetterRatio takes effect. -->
        <attr name="keyLetterSize" format="dimension" />
        <!-- Size of the text for keys with multiple letters. If not defined, keyLabelRatio takes
             effect. -->
        <attr name="keyLabelSize" format="dimension" />
        <!-- Size of the text for one letter keys, in the proportion of key height. -->
        <attr name="keyLetterRatio" format="float" />
        <!-- Large size of the text for one letter keys, in the proportion of key height. -->
        <attr name="keyLargeLetterRatio" format="float" />
        <!-- Size of the text for keys with multiple letters, in the proportion of key height. -->
        <attr name="keyLabelRatio" format="float" />
        <!-- Large size of the text for keys with multiple letters, in the proportion of key height. -->
        <attr name="keyLargeLabelRatio" format="float" />
        <!-- Size of the text for hint letter (= one character hint label), in the proportion of
             key height. -->
        <attr name="keyHintLetterRatio" format="float" />
        <!-- Size of the text for hint label, in the proportion of key height. -->
        <attr name="keyHintLabelRatio" format="float" />
        <!-- Size of the text for shifted letter hint, in the proportion of key height. -->
        <attr name="keyShiftedLetterHintRatio" format="float" />
        <!-- Horizontal padding of left/right aligned key label to the edge of the key. -->
        <attr name="keyLabelHorizontalPadding" format="dimension" />
        <!-- Right padding of hint letter to the edge of the key.-->
        <attr name="keyHintLetterPadding" format="dimension" />
        <!-- Bottom padding of popup hint letter "..." to the edge of the key.-->
        <attr name="keyPopupHintLetterPadding" format="dimension" />
        <!-- Right padding of shifted letter hint to the edge of the key.-->
        <attr name="keyShiftedLetterHintPadding" format="dimension" />

        <!-- Color to use for the label in a key. -->
        <attr name="keyTextColor" format="color" />
        <!-- Color to use for the label in a key when in inactivated state. -->
        <attr name="keyTextInactivatedColor" format="color" />
        <!-- Key hint letter (= one character hint label) color -->
        <attr name="keyHintLetterColor" format="color" />
        <!-- Key hint label color -->
        <attr name="keyHintLabelColor" format="color" />
        <!-- Shifted letter hint colors -->
        <attr name="keyShiftedLetterHintInactivatedColor" format="color" />
        <attr name="keyShiftedLetterHintActivatedColor" format="color" />

        <!-- Layout resource for key press feedback.-->
        <attr name="keyPreviewLayout" format="reference" />
        <!-- The background for key press feedback. -->
        <attr name="keyPreviewBackground" format="reference" />
        <!-- The background for the left edge key press feedback. -->
        <attr name="keyPreviewLeftBackground" format="reference" />
        <!-- The background for the right edge key press feedback. -->
        <attr name="keyPreviewRightBackground" format="reference" />
        <!-- The text color for key press feedback. -->
        <attr name="keyPreviewTextColor" format="color" />
        <!-- Vertical offset of the key press feedback from the key. -->
        <attr name="keyPreviewOffset" format="dimension" />
        <!-- Height of the key press feedback popup. -->
        <attr name="keyPreviewHeight" format="dimension" />
        <!-- Size of the text for key press feedback popup, int the proportion of key height -->
        <attr name="keyPreviewTextRatio" format="float" />
        <!-- Delay after key releasing and key press feedback dismissing in millisecond -->
        <attr name="keyPreviewLingerTimeout" format="integer" />

        <!-- Amount to offset the touch Y coordinate by, for bias correction. -->
        <attr name="verticalCorrection" format="dimension" />

        <!-- Layout resource for more keys panel -->
        <attr name="moreKeysLayout" format="reference" />

        <attr name="shadowColor" format="color" />
        <attr name="shadowRadius" format="float" />
        <attr name="backgroundDimAlpha" format="integer" />

        <attr name="keyTextStyle" format="enum">
            <!-- This should be aligned with Typeface.NORMAL etc. -->
            <enum name="normal" value="0" />
            <enum name="bold" value="1" />
            <enum name="italic" value="2" />
            <enum name="boldItalic" value="3" />
        </attr>
    </declare-styleable>

    <declare-styleable name="LatinKeyboardView">
        <attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
        <attr name="autoCorrectionSpacebarLedIcon" format="reference" />
        <!-- Size of the text for spacebar language label, in the proportion of key height. -->
        <attr name="spacebarTextRatio" format="fraction" />
        <attr name="spacebarTextColor" format="color" />
        <attr name="spacebarTextShadowColor" format="color" />
        <!-- Fadeout animator for spacebar language label. -->
        <attr name="languageOnSpacebarFinalAlpha" format="integer" />
        <attr name="languageOnSpacebarFadeoutAnimator" format="reference" />
        <!-- Fadeout and fadein animator for altCodeWhileTyping keys. -->
        <attr name="altCodeKeyWhileTypingFadeoutAnimator" format="reference" />
        <attr name="altCodeKeyWhileTypingFadeinAnimator" format="reference" />
        <!-- Key detection hysteresis distance. -->
        <attr name="keyHysteresisDistance" format="dimension" />
        <!-- Touch noise threshold time in millisecond -->
        <attr name="touchNoiseThresholdTime" format="integer" />
        <!-- Touch noise threshold distance in millimeter -->
        <attr name="touchNoiseThresholdDistance" format="dimension" />
        <!-- Sliding key input enable -->
        <attr name="slidingKeyInputEnable" format="boolean" />
        <!-- Key repeat start timeout -->
        <attr name="keyRepeatStartTimeout" format="integer" />
        <!-- Key repeat interval in millisecond. -->
        <attr name="keyRepeatInterval" format="integer" />
        <!-- Long press timeout of letter key in millisecond. -->
        <attr name="longPressKeyTimeout" format="integer" />
        <!-- Long press timeout of shift key in millisecond. -->
        <attr name="longPressShiftKeyTimeout" format="integer" />
        <!-- Ignore special key timeout while typing in millisecond. -->
        <attr name="ignoreAltCodeKeyTimeout" format="integer" />
        <!-- More keys keyboard will shown at touched point. -->
        <attr name="showMoreKeysKeyboardAtTouchedPoint" format="boolean" />
    </declare-styleable>

    <declare-styleable name="SuggestionsView">
        <attr name="suggestionStripOption" format="integer">
            <!-- This should be aligned with SuggestionsViewParams.AUTO_CORRECT_* and etc. -->
            <flag name="autoCorrectBold" value="0x01" />
            <flag name="autoCorrectUnderline" value="0x02" />
            <flag name="validTypedWordBold" value="0x04" />
        </attr>
        <attr name="colorValidTypedWord" format="color" />
        <attr name="colorTypedWord" format="color" />
        <attr name="colorAutoCorrect" format="color" />
        <attr name="colorSuggested" format="color" />
        <attr name="alphaValidTypedWord" format="integer" />
        <attr name="alphaTypedWord" format="integer" />
        <attr name="alphaAutoCorrect" format="integer" />
        <attr name="alphaSuggested" format="integer" />
        <attr name="alphaObsoleted" format="integer" />
        <attr name="suggestionsCountInStrip" format="integer" />
        <attr name="centerSuggestionPercentile" format="integer" />
        <attr name="maxMoreSuggestionsRow" format="integer" />
        <attr name="minMoreSuggestionsWidth" format="float" />
    </declare-styleable>

    <declare-styleable name="Keyboard">
        <attr name="themeId" format="integer" />
        <!-- Touch position correction -->
        <attr name="touchPositionCorrectionData" format="reference" />
        <!-- Default keyboard height -->
        <attr name="keyboardHeight" format="dimension|fraction" />
        <!-- Maximum keyboard height, in pixels or percentage of display height -->
        <attr name="maxKeyboardHeight" format="dimension|fraction" />
        <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction
             is positive, or percentage of display width if fraction is negative. -->
        <attr name="minKeyboardHeight" format="dimension|fraction" />
        <!-- Keyboard top, bottom, both horizontal edges paddings. -->
        <attr name="keyboardTopPadding" format="dimension|fraction" />
        <attr name="keyboardBottomPadding" format="dimension|fraction" />
        <attr name="keyboardHorizontalEdgesPadding" format="dimension|fraction" />
        <!-- Default height of a row (key height + vertical gap), in pixels or percentage of
             keyboard height. -->
        <attr name="rowHeight" format="dimension|fraction" />
        <!-- Default horizontal gap between keys, in pixels or percentage of keyboard width. -->
        <attr name="horizontalGap" format="dimension|fraction" />
        <!-- Default vertical gap between rows of keys, in pixels or percentage of keyboard
             height. -->
        <attr name="verticalGap" format="dimension|fraction" />
        <!-- More keys keyboard layout template -->
        <attr name="moreKeysTemplate" format="reference" />
        <!-- Icon set for key top and key preview.
             These should be aligned with KeyboardIconsSet.NAMES_AND_ATTR_IDS[] -->
        <attr name="iconShiftKey" format="reference" />
        <attr name="iconDeleteKey" format="reference" />
        <attr name="iconSettingsKey" format="reference" />
        <attr name="iconSpaceKey" format="reference" />
        <attr name="iconEnterKey" format="reference" />
        <attr name="iconSearchKey" format="reference" />
        <attr name="iconTabKey" format="reference" />
        <attr name="iconShortcutKey" format="reference" />
        <attr name="iconShortcutForLabel" format="reference" />
        <attr name="iconSpaceKeyForNumberLayout" format="reference" />
        <attr name="iconShiftKeyShifted" format="reference" />
        <attr name="iconShortcutKeyDisabled" format="reference" />
        <attr name="iconTabKeyPreview" format="reference" />
        <attr name="iconLanguageSwitchKey" format="reference" />
        <attr name="iconZwnjKey" format="reference" />
        <attr name="iconZwjKey" format="reference" />
    </declare-styleable>

    <declare-styleable name="Keyboard_Key">
        <!-- The unicode value that this key outputs.
             Code value represented in hexadecimal prefixed with "0x" or code value reference using
             "!code/<code_name>" notation. -->
        <attr name="code" format="string" />
        <!-- The alternate unicode value that this key outputs while typing.
             Code value represented in hexadecimal prefixed with "0x" or code value reference using
             "!code/<code_name>" notation. -->
        <attr name="altCode" format="string" />
        <!-- The keys to display in the more keys keyboard. -->
        <attr name="moreKeys" format="string" />
        <!-- The keys to display in the more keys keyboard in addition to moreKeys.
             The additional more keys are inserted at the '%' markers in the moreKeys if any.
             They are inserted at the head of moreKeys if none.
             If there are remaining entries of additionalMoreKeys even after all '%' markers have
             been replaced, those remaining entries are appended at the end of moreKeys. -->
        <attr name="additionalMoreKeys" format="string" />
        <!-- Maximum column of more keys keyboard -->
        <attr name="maxMoreKeysColumn" format="integer" />
        <attr name="backgroundType" format="enum">
            <!-- This should be aligned with Key.BACKGROUND_TYPE_* -->
            <enum name="normal" value="0" />
            <enum name="functional" value="1" />
            <enum name="action" value="2" />
            <enum name="stickyOff" value="3" />
            <enum name="stickyOn" value="4" />
        </attr>
        <!-- The key action flags. -->
        <attr name="keyActionFlags" format="integer">
            <!-- This should be aligned with Key.ACTION_FLAGS_* -->
            <flag name="isRepeatable" value="0x01" />
            <flag name="noKeyPreview" value="0x02" />
            <flag name="altCodeWhileTyping" value="0x04" />
            <flag name="enableLongPress" value="0x08" />
        </attr>
        <!-- The string of characters to output when this key is pressed. -->
        <attr name="keyOutputText" format="string" />
        <!-- The label to display on the key. -->
        <attr name="keyLabel" format="string" />
        <!-- The hint label to display on the key in conjunction with the label. -->
        <attr name="keyHintLabel" format="string" />
        <!-- The key label flags. -->
        <attr name="keyLabelFlags" format="integer">
            <!-- This should be aligned with Key.LABEL_FLAGS__* -->
            <flag name="alignLeft" value="0x01" />
            <flag name="alignRight" value="0x02" />
            <flag name="alignLeftOfCenter" value="0x08" />
            <flag name="fontNormal" value="0x10" />
            <flag name="fontMonoSpace" value="0x20" />
            <flag name="followKeyLargeLetterRatio" value="0x40" />
            <flag name="followKeyLetterRatio" value="0x80" />
            <flag name="followKeyLabelRatio" value="0xC0" />
            <flag name="followKeyLargeLabelRatio" value="0x100" />
            <flag name="followKeyHintLabelRatio" value="0x140" />
            <flag name="hasPopupHint" value="0x200" />
            <flag name="hasShiftedLetterHint" value="0x400" />
            <flag name="hasHintLabel" value="0x800" />
            <flag name="withIconLeft" value="0x1000" />
            <flag name="withIconRight" value="0x2000" />
            <flag name="autoXScale" value="0x4000" />
            <!-- If true, character case of code, altCode, moreKeys, keyOutputText, keyLabel,
                 or keyHintLabel will never be subject to change. -->
            <flag name="preserveCase" value="0x8000" />
            <!-- If true, use keyShiftedLetterHintActivatedColor for the shifted letter hint and
                 keyTextInactivatedColor for the primary key top label. -->
            <flag name="shiftedLetterActivated" value="0x10000" />
            <!-- If true, use EditorInfo.actionLabel for the key label. -->
            <flag name="fromCustomActionLabel" value="0x20000" />
            <!-- If true, disable keyHintLabel. -->
            <flag name="disableKeyHintLabel" value="0x40000000" />
            <!-- If true, disable additionalMoreKeys. -->
            <flag name="disableAdditionalMoreKeys" value="0x80000000" />
        </attr>
        <!-- The icon to display on the key instead of the label. -->
        <attr name="keyIcon" format="string" />
        <!-- The icon for disabled key -->
        <attr name="keyIconDisabled" format="string" />
        <!-- The icon to show in the popup preview. -->
        <attr name="keyIconPreview" format="string" />
        <!-- The key style to specify a set of key attributes defined by <key_style/> -->
        <attr name="keyStyle" format="string" />
        <!-- Visual insets -->
        <attr name="visualInsetsLeft" format="dimension|fraction" />
        <attr name="visualInsetsRight" format="dimension|fraction" />
        <!-- Width of the key, in pixels or percentage of display width.
             If the value is fillRight, the actual key width will be determined to fill out the area
             up to the right edge of the keyboard. -->
        <!-- This should be aligned with KeyboardBuilder.Row.KEYWIDTH_* -->
        <attr name="keyWidth" format="dimension|fraction|enum">
            <enum name="fillRight" value="-1" />
        </attr>
        <!-- The X-coordinate of upper right corner of this key including horizontal gap.
             If the value is negative, the origin is the right edge of the keyboard. -->
        <attr name="keyXPos" format="dimension|fraction" />
    </declare-styleable>

    <declare-styleable name="Keyboard_Include">
        <attr name="keyboardLayout" format="reference" />
    </declare-styleable>

    <declare-styleable name="Keyboard_Case">
        <!-- This should be aligned with KeyboardLayoutSet_Element's elementName. -->
        <attr name="keyboardLayoutSetElement" format="enum|string">
            <enum name="alphabet" value="0" />
            <enum name="alphabetManualShifted" value="1" />
            <enum name="alphabetAutomaticShifted" value="2" />
            <enum name="alphabetShiftLocked" value="3" />
            <enum name="alphabetShiftLockShifted" value="4" />
            <enum name="symbols" value="5" />
            <enum name="symbolsShifted" value="6"  />
            <enum name="phone" value="7"  />
            <enum name="phoneSymbols" value="8"  />
            <enum name="number" value="9"  />
        </attr>
        <!-- This should be aligned with KeyboardId.MODE_* -->
        <attr name="mode" format="enum|string">
            <enum name="text" value="0" />
            <enum name="url" value="1" />
            <enum name="email" value="2" />
            <enum name="im" value="3" />
            <enum name="phone" value="4" />
            <enum name="number" value="5" />
        </attr>
        <attr name="navigateNext" format="boolean" />
        <attr name="navigatePrevious" format="boolean" />
        <attr name="passwordInput" format="boolean" />
        <attr name="clobberSettingsKey" format="boolean" />
        <attr name="shortcutKeyEnabled" format="boolean" />
        <attr name="hasShortcutKey" format="boolean" />
        <attr name="languageSwitchKeyEnabled" format="boolean" />
        <attr name="isMultiLine" format="boolean" />
        <attr name="imeAction" format="enum">
            <!-- This should be aligned with EditorInfo.IME_ACTION_* -->
            <enum name="actionUnspecified" value="0" />
            <enum name="actionNone" value="1" />
            <enum name="actionGo" value="2" />
            <enum name="actionSearch" value="3" />
            <enum name="actionSend" value="4" />
            <enum name="actionNext" value="5" />
            <enum name="actionDone" value="6" />
            <enum name="actionPrevious" value="7" />
            <!--  This should be aligned with KeyboardId.IME_ACTION_* -->
            <enum name="actionCustomLabel" value="0x100" />
        </attr>
        <attr name="localeCode" format="string" />
        <attr name="languageCode" format="string" />
        <attr name="countryCode" format="string" />
    </declare-styleable>

    <declare-styleable name="Keyboard_KeyStyle">
        <attr name="styleName" format="string" />
        <attr name="parentStyle" format="string" />
    </declare-styleable>

    <declare-styleable name="KeyboardLayoutSet_Element">
        <!-- This should be aligned with KeyboardId.ELEMENT_* -->
        <attr name="elementName" format="enum">
            <enum name="alphabet" value="0" />
            <enum name="alphabetManualShifted" value="1" />
            <enum name="alphabetAutomaticShifted" value="2" />
            <enum name="alphabetShiftLocked" value="3" />
            <enum name="alphabetShiftLockShifted" value="4" />
            <enum name="symbols" value="5" />
            <enum name="symbolsShifted" value="6"  />
            <enum name="phone" value="7"  />
            <enum name="phoneSymbols" value="8"  />
            <enum name="number" value="9"  />
        </attr>
        <attr name="elementKeyboard" format="reference"/>
        <!-- Enable proximity characters correction. Disabled by default. -->
        <attr name="enableProximityCharsCorrection" format="boolean" />
    </declare-styleable>
</resources>