• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<resources>
18    <declare-styleable name="KeyboardTheme">
19        <!-- Keyboard style -->
20        <attr name="keyboardStyle" format="reference" />
21        <!-- KeyboardView style -->
22        <attr name="keyboardViewStyle" format="reference" />
23        <!-- MainKeyboardView style -->
24        <attr name="mainKeyboardViewStyle" format="reference" />
25        <!-- MoreKeysKeyboard style -->
26        <attr name="moreKeysKeyboardStyle" format="reference" />
27        <!-- MoreKeysKeyboardView style -->
28        <attr name="moreKeysKeyboardViewStyle" format="reference" />
29        <attr name="moreKeysKeyboardPanelStyle" format="reference" />
30        <!-- Suggestions strip style -->
31        <attr name="suggestionsStripBackgroundStyle" format="reference" />
32        <attr name="suggestionStripViewStyle" format="reference" />
33        <attr name="moreSuggestionsViewStyle" format="reference" />
34        <attr name="suggestionBackgroundStyle" format="reference" />
35        <attr name="suggestionPreviewBackgroundStyle" format="reference" />
36    </declare-styleable>
37
38    <declare-styleable name="KeyboardView">
39        <!-- Image for the key. This image needs to be a StateListDrawable, with the following
40             possible states: normal, pressed, checkable, checkable+pressed, checkable+checked,
41             checkable+checked+pressed. -->
42        <attr name="keyBackground" format="reference" />
43
44        <!-- Horizontal padding of left/right aligned key label to the edge of the key. -->
45        <attr name="keyLabelHorizontalPadding" format="dimension" />
46        <!-- Right padding of hint letter to the edge of the key.-->
47        <attr name="keyHintLetterPadding" format="dimension" />
48        <!-- Bottom padding of popup hint letter "..." to the edge of the key.-->
49        <attr name="keyPopupHintLetterPadding" format="dimension" />
50        <!-- Right padding of shifted letter hint to the edge of the key.-->
51        <attr name="keyShiftedLetterHintPadding" format="dimension" />
52        <!-- Blur radius of key text shadow. -->
53        <attr name="keyTextShadowRadius" format="float" />
54
55        <!-- Layout resource for key press feedback.-->
56        <attr name="keyPreviewLayout" format="reference" />
57        <!-- Key preview background states -->
58        <attr name="state_left_edge" format="boolean" />
59        <attr name="state_right_edge" format="boolean" />
60        <attr name="state_has_morekeys" format="boolean" />
61        <!-- Vertical offset of the key press feedback from the key. -->
62        <attr name="keyPreviewOffset" format="dimension" />
63        <!-- Height of the key press feedback popup. -->
64        <attr name="keyPreviewHeight" format="dimension" />
65        <!-- Delay after key releasing and key press feedback dismissing in millisecond -->
66        <attr name="keyPreviewLingerTimeout" format="integer" />
67
68        <!-- Amount to offset the touch Y coordinate by, for bias correction. -->
69        <attr name="verticalCorrection" format="dimension" />
70
71        <!-- Layout resource for more keys panel -->
72        <attr name="moreKeysLayout" format="reference" />
73
74        <attr name="backgroundDimAlpha" format="integer" />
75
76        <!-- Attributes for PreviewPlacerView -->
77        <attr name="gestureFloatingPreviewTextSize" format="dimension" />
78        <attr name="gestureFloatingPreviewTextColor" format="color" />
79        <attr name="gestureFloatingPreviewTextOffset" format="dimension" />
80        <attr name="gestureFloatingPreviewColor" format="color" />
81        <attr name="gestureFloatingPreviewHorizontalPadding" format="dimension" />
82        <attr name="gestureFloatingPreviewVerticalPadding" format="dimension" />
83        <attr name="gestureFloatingPreviewRoundRadius" format="dimension" />
84        <!-- Delay after gesture input and gesture floating preview text dismissing in millisecond -->
85        <attr name="gestureFloatingPreviewTextLingerTimeout" format="integer" />
86        <!-- Delay after gesture trail starts fading out in millisecond. -->
87        <attr name="gesturePreviewTrailFadeoutStartDelay" format="integer" />
88        <!-- Duration while gesture preview trail is fading out in millisecond. -->
89        <attr name="gesturePreviewTrailFadeoutDuration" format="integer" />
90        <!-- Interval of updating gesture preview trail in millisecond. -->
91        <attr name="gesturePreviewTrailUpdateInterval" format="integer" />
92        <attr name="gesturePreviewTrailColor" format="color" />
93        <attr name="gesturePreviewTrailStartWidth" format="dimension" />
94        <attr name="gesturePreviewTrailEndWidth" format="dimension" />
95    </declare-styleable>
96
97    <declare-styleable name="MainKeyboardView">
98        <attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
99        <attr name="autoCorrectionSpacebarLedIcon" format="reference" />
100        <!-- Size of the text for spacebar language label, in the proportion of key height. -->
101        <attr name="spacebarTextRatio" format="fraction" />
102        <attr name="spacebarTextColor" format="color" />
103        <attr name="spacebarTextShadowColor" format="color" />
104        <!-- Fadeout animator for spacebar language label. -->
105        <attr name="languageOnSpacebarFinalAlpha" format="integer" />
106        <attr name="languageOnSpacebarFadeoutAnimator" format="reference" />
107        <!-- Fadeout and fadein animator for altCodeWhileTyping keys. -->
108        <attr name="altCodeKeyWhileTypingFadeoutAnimator" format="reference" />
109        <attr name="altCodeKeyWhileTypingFadeinAnimator" format="reference" />
110        <!-- Key detection hysteresis distance. -->
111        <attr name="keyHysteresisDistance" format="dimension" />
112        <!-- Key detection hysteresis distance for shift/symbols sliding input. -->
113        <attr name="keyHysteresisDistanceForSlidingModifier" format="dimension" />
114        <!-- Touch noise threshold time in millisecond -->
115        <attr name="touchNoiseThresholdTime" format="integer" />
116        <!-- Touch noise threshold distance in millimeter -->
117        <attr name="touchNoiseThresholdDistance" format="dimension" />
118        <!-- Sliding key input enable -->
119        <attr name="slidingKeyInputEnable" format="boolean" />
120        <!-- Key repeat start timeout -->
121        <attr name="keyRepeatStartTimeout" format="integer" />
122        <!-- Key repeat interval in millisecond. -->
123        <attr name="keyRepeatInterval" format="integer" />
124        <!-- Long press timeout of letter key in millisecond. -->
125        <attr name="longPressKeyTimeout" format="integer" />
126        <!-- Long press timeout of shift key in millisecond. -->
127        <attr name="longPressShiftKeyTimeout" format="integer" />
128        <!-- Ignore special key timeout while typing in millisecond. -->
129        <attr name="ignoreAltCodeKeyTimeout" format="integer" />
130        <!-- More keys keyboard will shown at touched point. -->
131        <attr name="showMoreKeysKeyboardAtTouchedPoint" format="boolean" />
132        <!-- Static threshold for gesture after fast typing (msec) -->
133        <attr name="gestureStaticTimeThresholdAfterFastTyping" format="integer" />
134        <!-- Static threshold for starting gesture detection (keyWidth%/sec) -->
135        <attr name="gestureDetectFastMoveSpeedThreshold" format="fraction" />
136        <!-- Dynamic threshold for gesture after fast typing (msec) -->
137        <attr name="gestureDynamicThresholdDecayDuration" format="integer" />
138        <!-- Time based threshold values for gesture detection (msec) -->
139        <attr name="gestureDynamicTimeThresholdFrom" format="integer" />
140        <attr name="gestureDynamicTimeThresholdTo" format="integer" />
141        <!-- Distance based threshold values for gesture detection (keyWidth%/sec) -->
142        <attr name="gestureDynamicDistanceThresholdFrom" format="fraction" />
143        <attr name="gestureDynamicDistanceThresholdTo" format="fraction" />
144        <!-- Parameter for gesture sampling (keyWidth%/sec) -->
145        <attr name="gestureSamplingMinimumDistance" format="fraction" />
146        <!-- Parameters for gesture recognition (msec) and (keyWidth%/sec) -->
147        <attr name="gestureRecognitionMinimumTime" format="integer" />
148        <attr name="gestureRecognitionSpeedThreshold" format="fraction" />
149        <!-- Suppress showing key preview duration after batch input in millisecond -->
150        <attr name="suppressKeyPreviewAfterBatchInputDuration" format="integer" />
151    </declare-styleable>
152
153    <declare-styleable name="SuggestionStripView">
154        <attr name="suggestionStripOption" format="integer">
155            <!-- This should be aligned with SuggestionStripViewParams.AUTO_CORRECT_* and etc. -->
156            <flag name="autoCorrectBold" value="0x01" />
157            <flag name="autoCorrectUnderline" value="0x02" />
158            <flag name="validTypedWordBold" value="0x04" />
159        </attr>
160        <attr name="colorValidTypedWord" format="color" />
161        <attr name="colorTypedWord" format="color" />
162        <attr name="colorAutoCorrect" format="color" />
163        <attr name="colorSuggested" format="color" />
164        <attr name="alphaValidTypedWord" format="fraction" />
165        <attr name="alphaTypedWord" format="fraction" />
166        <attr name="alphaAutoCorrect" format="fraction" />
167        <attr name="alphaSuggested" format="fraction" />
168        <attr name="alphaObsoleted" format="fraction" />
169        <attr name="suggestionsCountInStrip" format="integer" />
170        <attr name="centerSuggestionPercentile" format="fraction" />
171        <attr name="maxMoreSuggestionsRow" format="integer" />
172        <attr name="minMoreSuggestionsWidth" format="float" />
173    </declare-styleable>
174
175    <declare-styleable name="Keyboard">
176        <attr name="themeId" format="integer" />
177        <!-- Touch position correction -->
178        <attr name="touchPositionCorrectionData" format="reference" />
179        <!-- Default keyboard height -->
180        <attr name="keyboardHeight" format="dimension|fraction" />
181        <!-- Maximum keyboard height, in pixels or percentage of display height -->
182        <attr name="maxKeyboardHeight" format="dimension|fraction" />
183        <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction
184             is positive, or percentage of display width if fraction is negative. -->
185        <attr name="minKeyboardHeight" format="dimension|fraction" />
186        <!-- Keyboard top, bottom, both horizontal edges paddings. -->
187        <attr name="keyboardTopPadding" format="dimension|fraction" />
188        <attr name="keyboardBottomPadding" format="dimension|fraction" />
189        <attr name="keyboardHorizontalEdgesPadding" format="dimension|fraction" />
190        <!-- Default height of a row (key height + vertical gap), in pixels or percentage of
191             keyboard height. -->
192        <attr name="rowHeight" format="dimension|fraction" />
193        <!-- Default horizontal gap between keys, in pixels or percentage of keyboard width. -->
194        <attr name="horizontalGap" format="dimension|fraction" />
195        <!-- Default vertical gap between rows of keys, in pixels or percentage of keyboard
196             height. -->
197        <attr name="verticalGap" format="dimension|fraction" />
198        <!-- More keys keyboard layout template -->
199        <attr name="moreKeysTemplate" format="reference" />
200        <!-- Icon set for key top and key preview.
201             These should be aligned with KeyboardIconsSet.NAMES_AND_ATTR_IDS[] -->
202        <attr name="iconShiftKey" format="reference" />
203        <attr name="iconDeleteKey" format="reference" />
204        <attr name="iconSettingsKey" format="reference" />
205        <attr name="iconSpaceKey" format="reference" />
206        <attr name="iconEnterKey" format="reference" />
207        <attr name="iconSearchKey" format="reference" />
208        <attr name="iconTabKey" format="reference" />
209        <attr name="iconShortcutKey" format="reference" />
210        <attr name="iconShortcutForLabel" format="reference" />
211        <attr name="iconSpaceKeyForNumberLayout" format="reference" />
212        <attr name="iconShiftKeyShifted" format="reference" />
213        <attr name="iconShortcutKeyDisabled" format="reference" />
214        <attr name="iconTabKeyPreview" format="reference" />
215        <attr name="iconLanguageSwitchKey" format="reference" />
216        <attr name="iconZwnjKey" format="reference" />
217        <attr name="iconZwjKey" format="reference" />
218    </declare-styleable>
219
220    <declare-styleable name="Keyboard_Key">
221        <!-- The unicode value that this key outputs.
222             Code value represented in hexadecimal prefixed with "0x" or code value reference using
223             "!code/<code_name>" notation. -->
224        <attr name="code" format="string" />
225        <!-- The alternate unicode value that this key outputs while typing.
226             Code value represented in hexadecimal prefixed with "0x" or code value reference using
227             "!code/<code_name>" notation. -->
228        <attr name="altCode" format="string" />
229        <!-- The keys to display in the more keys keyboard. -->
230        <attr name="moreKeys" format="string" />
231        <!-- The keys to display in the more keys keyboard in addition to moreKeys.
232             The additional more keys are inserted at the '%' markers in the moreKeys if any.
233             They are inserted at the head of moreKeys if none.
234             If there are remaining entries of additionalMoreKeys even after all '%' markers have
235             been replaced, those remaining entries are appended at the end of moreKeys. -->
236        <attr name="additionalMoreKeys" format="string" />
237        <!-- Maximum column of more keys keyboard -->
238        <attr name="maxMoreKeysColumn" format="integer" />
239        <attr name="backgroundType" format="enum">
240            <!-- This should be aligned with Key.BACKGROUND_TYPE_* -->
241            <enum name="normal" value="0" />
242            <enum name="functional" value="1" />
243            <enum name="action" value="2" />
244            <enum name="stickyOff" value="3" />
245            <enum name="stickyOn" value="4" />
246        </attr>
247        <!-- The key action flags. -->
248        <attr name="keyActionFlags" format="integer">
249            <!-- This should be aligned with Key.ACTION_FLAGS_* -->
250            <flag name="isRepeatable" value="0x01" />
251            <flag name="noKeyPreview" value="0x02" />
252            <flag name="altCodeWhileTyping" value="0x04" />
253            <flag name="enableLongPress" value="0x08" />
254        </attr>
255        <!-- The string of characters to output when this key is pressed. -->
256        <attr name="keyOutputText" format="string" />
257        <!-- The label to display on the key. -->
258        <attr name="keyLabel" format="string" />
259        <!-- The hint label to display on the key in conjunction with the label. -->
260        <attr name="keyHintLabel" format="string" />
261        <!-- The key label flags. -->
262        <attr name="keyLabelFlags" format="integer">
263            <!-- This should be aligned with Key.LABEL_FLAGS__* -->
264            <flag name="alignLeft" value="0x01" />
265            <flag name="alignRight" value="0x02" />
266            <flag name="alignLeftOfCenter" value="0x08" />
267            <flag name="fontNormal" value="0x10" />
268            <flag name="fontMonoSpace" value="0x20" />
269            <flag name="followKeyLargeLetterRatio" value="0x40" />
270            <flag name="followKeyLetterRatio" value="0x80" />
271            <flag name="followKeyLabelRatio" value="0xC0" />
272            <flag name="followKeyLargeLabelRatio" value="0x100" />
273            <flag name="followKeyHintLabelRatio" value="0x140" />
274            <flag name="hasPopupHint" value="0x200" />
275            <flag name="hasShiftedLetterHint" value="0x400" />
276            <flag name="hasHintLabel" value="0x800" />
277            <flag name="withIconLeft" value="0x1000" />
278            <flag name="withIconRight" value="0x2000" />
279            <flag name="autoXScale" value="0x4000" />
280            <!-- If true, character case of code, altCode, moreKeys, keyOutputText, keyLabel,
281                 or keyHintLabel will never be subject to change. -->
282            <flag name="preserveCase" value="0x8000" />
283            <!-- If true, use keyShiftedLetterHintActivatedColor for the shifted letter hint and
284                 keyTextInactivatedColor for the primary key top label. -->
285            <flag name="shiftedLetterActivated" value="0x10000" />
286            <!-- If true, use EditorInfo.actionLabel for the key label. -->
287            <flag name="fromCustomActionLabel" value="0x20000" />
288            <!-- If true, disable keyHintLabel. -->
289            <flag name="disableKeyHintLabel" value="0x40000000" />
290            <!-- If true, disable additionalMoreKeys. -->
291            <flag name="disableAdditionalMoreKeys" value="0x80000000" />
292        </attr>
293        <!-- The icon to display on the key instead of the label. -->
294        <attr name="keyIcon" format="string" />
295        <!-- The icon for disabled key -->
296        <attr name="keyIconDisabled" format="string" />
297        <!-- The icon to show in the popup preview. -->
298        <attr name="keyIconPreview" format="string" />
299        <!-- The key style to specify a set of key attributes defined by <key_style/> -->
300        <attr name="keyStyle" format="string" />
301        <!-- Visual insets -->
302        <attr name="visualInsetsLeft" format="dimension|fraction" />
303        <attr name="visualInsetsRight" format="dimension|fraction" />
304        <!-- Width of the key, in pixels or percentage of display width.
305             If the value is fillRight, the actual key width will be determined to fill out the area
306             up to the right edge of the keyboard. -->
307        <!-- This should be aligned with KeyboardBuilder.Row.KEYWIDTH_* -->
308        <attr name="keyWidth" format="dimension|fraction|enum">
309            <enum name="fillRight" value="-1" />
310        </attr>
311        <!-- The X-coordinate of upper right corner of this key including horizontal gap.
312             If the value is negative, the origin is the right edge of the keyboard. -->
313        <attr name="keyXPos" format="dimension|fraction" />
314
315        <!-- Key top visual attributes -->
316        <attr name="keyTypeface" format="enum">
317            <!-- This should be aligned with Typeface.NORMAL etc. -->
318            <enum name="normal" value="0" />
319            <enum name="bold" value="1" />
320            <enum name="italic" value="2" />
321            <enum name="boldItalic" value="3" />
322        </attr>
323        <!-- Size of the text for one letter keys. If specified as fraction, the text size is
324             measured in the proportion of key height. -->
325        <attr name="keyLetterSize" format="dimension|fraction" />
326        <!-- Size of the text for keys with multiple letters. If specified as fraction, the text
327             size is measured in the proportion of key height. -->
328        <attr name="keyLabelSize" format="dimension|fraction" />
329        <!-- Large size of the text for one letter keys, in the proportion of key height. -->
330        <attr name="keyLargeLetterRatio" format="fraction" />
331        <!-- Large size of the text for keys with multiple letters, in the proportion of key height. -->
332        <attr name="keyLargeLabelRatio" format="fraction" />
333        <!-- Size of the text for hint letter (= one character hint label), in the proportion of
334             key height. -->
335        <attr name="keyHintLetterRatio" format="fraction" />
336        <!-- Size of the text for hint label, in the proportion of key height. -->
337        <attr name="keyHintLabelRatio" format="fraction" />
338        <!-- Size of the text for shifted letter hint, in the proportion of key height. -->
339        <attr name="keyShiftedLetterHintRatio" format="fraction" />
340        <!-- Color to use for the label in a key. -->
341        <attr name="keyTextColor" format="color" />
342        <attr name="keyTextShadowColor" format="color" />
343        <!-- Color to use for the label in a key when in inactivated state. -->
344        <attr name="keyTextInactivatedColor" format="color" />
345        <!-- Key hint letter (= one character hint label) color -->
346        <attr name="keyHintLetterColor" format="color" />
347        <!-- Key hint label color -->
348        <attr name="keyHintLabelColor" format="color" />
349        <!-- Shifted letter hint colors -->
350        <attr name="keyShiftedLetterHintInactivatedColor" format="color" />
351        <attr name="keyShiftedLetterHintActivatedColor" format="color" />
352
353        <!-- Key preview visual parameters -->
354        <!-- The text color for key press feedback. -->
355        <attr name="keyPreviewTextColor" format="color" />
356        <!-- Size of the text for key press feedback popup, in the proportion of key height. -->
357        <attr name="keyPreviewTextRatio" format="fraction" />
358    </declare-styleable>
359
360    <declare-styleable name="Keyboard_Include">
361        <attr name="keyboardLayout" format="reference" />
362    </declare-styleable>
363
364    <declare-styleable name="Keyboard_Case">
365        <!-- This should be aligned with KeyboardLayoutSet_Element's elementName. -->
366        <attr name="keyboardLayoutSetElement" format="enum|string">
367            <enum name="alphabet" value="0" />
368            <enum name="alphabetManualShifted" value="1" />
369            <enum name="alphabetAutomaticShifted" value="2" />
370            <enum name="alphabetShiftLocked" value="3" />
371            <enum name="alphabetShiftLockShifted" value="4" />
372            <enum name="symbols" value="5" />
373            <enum name="symbolsShifted" value="6"  />
374            <enum name="phone" value="7"  />
375            <enum name="phoneSymbols" value="8"  />
376            <enum name="number" value="9"  />
377        </attr>
378        <!-- This should be aligned with KeyboardId.MODE_* -->
379        <attr name="mode" format="enum|string">
380            <enum name="text" value="0" />
381            <enum name="url" value="1" />
382            <enum name="email" value="2" />
383            <enum name="im" value="3" />
384            <enum name="phone" value="4" />
385            <enum name="number" value="5" />
386        </attr>
387        <attr name="navigateNext" format="boolean" />
388        <attr name="navigatePrevious" format="boolean" />
389        <attr name="passwordInput" format="boolean" />
390        <attr name="clobberSettingsKey" format="boolean" />
391        <attr name="shortcutKeyEnabled" format="boolean" />
392        <attr name="hasShortcutKey" format="boolean" />
393        <attr name="languageSwitchKeyEnabled" format="boolean" />
394        <attr name="isMultiLine" format="boolean" />
395        <attr name="imeAction" format="enum">
396            <!-- This should be aligned with EditorInfo.IME_ACTION_* -->
397            <enum name="actionUnspecified" value="0" />
398            <enum name="actionNone" value="1" />
399            <enum name="actionGo" value="2" />
400            <enum name="actionSearch" value="3" />
401            <enum name="actionSend" value="4" />
402            <enum name="actionNext" value="5" />
403            <enum name="actionDone" value="6" />
404            <enum name="actionPrevious" value="7" />
405            <!--  This should be aligned with KeyboardId.IME_ACTION_* -->
406            <enum name="actionCustomLabel" value="0x100" />
407        </attr>
408        <attr name="localeCode" format="string" />
409        <attr name="languageCode" format="string" />
410        <attr name="countryCode" format="string" />
411    </declare-styleable>
412
413    <declare-styleable name="Keyboard_KeyStyle">
414        <attr name="styleName" format="string" />
415        <attr name="parentStyle" format="string" />
416    </declare-styleable>
417
418    <declare-styleable name="KeyboardLayoutSet_Element">
419        <!-- This should be aligned with KeyboardId.ELEMENT_* -->
420        <attr name="elementName" format="enum">
421            <enum name="alphabet" value="0" />
422            <enum name="alphabetManualShifted" value="1" />
423            <enum name="alphabetAutomaticShifted" value="2" />
424            <enum name="alphabetShiftLocked" value="3" />
425            <enum name="alphabetShiftLockShifted" value="4" />
426            <enum name="symbols" value="5" />
427            <enum name="symbolsShifted" value="6"  />
428            <enum name="phone" value="7"  />
429            <enum name="phoneSymbols" value="8"  />
430            <enum name="number" value="9"  />
431        </attr>
432        <attr name="elementKeyboard" format="reference"/>
433        <!-- Enable proximity characters correction. Disabled by default. -->
434        <attr name="enableProximityCharsCorrection" format="boolean" />
435    </declare-styleable>
436</resources>
437