satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 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> |
Tadashi G. Takaoka | 13a7419 | 2011-05-24 21:08:20 +0900 | [diff] [blame] | 18 | <declare-styleable name="KeyboardTheme"> |
Tadashi G. Takaoka | b7758d6 | 2011-06-15 13:38:58 +0900 | [diff] [blame] | 19 | <!-- Keyboard style --> |
| 20 | <attr name="keyboardStyle" format="reference" /> |
Tadashi G. Takaoka | 13a7419 | 2011-05-24 21:08:20 +0900 | [diff] [blame] | 21 | <!-- KeyboardView style --> |
| 22 | <attr name="keyboardViewStyle" format="reference" /> |
| 23 | <attr name="keyPreviewStyle" format="reference" /> |
| 24 | <!-- PopupMiniKeyboardView style --> |
| 25 | <attr name="popupMiniKeyboardViewStyle" format="reference" /> |
| 26 | <attr name="popupMiniKeyboardPanelStyle" format="reference" /> |
| 27 | <!-- Suggestions strip style --> |
| 28 | <attr name="suggestionsStripBackgroundStyle" format="reference" /> |
| 29 | <attr name="suggestionBackgroundStyle" format="reference" /> |
| 30 | <attr name="suggestionPreviewBackgroundStyle" format="reference" /> |
| 31 | </declare-styleable> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 32 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 33 | <declare-styleable name="KeyboardView"> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 34 | <!-- Image for the key. This image needs to be a StateListDrawable, with the following |
| 35 | possible states: normal, pressed, checkable, checkable+pressed, checkable+checked, |
| 36 | checkable+checked+pressed. --> |
| 37 | <attr name="keyBackground" format="reference" /> |
| 38 | |
Tadashi G. Takaoka | d157834 | 2011-05-12 23:49:19 +0900 | [diff] [blame] | 39 | <!-- Size of the text for one letter character keys, in the proportion of key height. |
| 40 | --> |
| 41 | <attr name="keyLetterRatio" format="float" /> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 42 | |
Tadashi G. Takaoka | d157834 | 2011-05-12 23:49:19 +0900 | [diff] [blame] | 43 | <!-- Size of the text for custom keys with some text and no icon, in the proportion of key |
| 44 | height. --> |
| 45 | <attr name="labelTextRatio" format="float" /> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 46 | |
| 47 | <!-- Color to use for the label in a key. --> |
| 48 | <attr name="keyTextColor" format="color" /> |
| 49 | |
Tadashi G. Takaoka | 5d04042 | 2010-12-01 12:22:19 +0900 | [diff] [blame] | 50 | <!-- Color to use for the label in a key when in disabled state. --> |
| 51 | <attr name="keyTextColorDisabled" format="color" /> |
| 52 | |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 53 | <!-- Layout resource for key press feedback.--> |
| 54 | <attr name="keyPreviewLayout" format="reference" /> |
| 55 | |
| 56 | <!-- Vertical offset of the key press feedback from the key. --> |
| 57 | <attr name="keyPreviewOffset" format="dimension" /> |
| 58 | |
| 59 | <!-- Height of the key press feedback popup. --> |
| 60 | <attr name="keyPreviewHeight" format="dimension" /> |
| 61 | |
Tadashi G. Takaoka | eb68036 | 2010-09-13 19:26:23 +0900 | [diff] [blame] | 62 | <!-- Hysteresis distance for key debouncing --> |
| 63 | <attr name="keyHysteresisDistance" format="dimension" /> |
| 64 | |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 65 | <!-- Amount to offset the touch Y coordinate by, for bias correction. --> |
| 66 | <attr name="verticalCorrection" format="dimension" /> |
| 67 | |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 68 | <!-- Layout resource for popup keyboards. --> |
| 69 | <attr name="popupLayout" format="reference" /> |
| 70 | |
| 71 | <attr name="shadowColor" format="color" /> |
| 72 | <attr name="shadowRadius" format="float" /> |
| 73 | <attr name="backgroundDimAmount" format="float" /> |
| 74 | |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 75 | <attr name="keyLetterStyle" format="enum"> |
Tadashi G. Takaoka | 5d04042 | 2010-12-01 12:22:19 +0900 | [diff] [blame] | 76 | <!-- This should be aligned with Typeface.NORMAL etc. --> |
Tadashi G. Takaoka | 59c9930 | 2010-11-21 16:40:38 -0800 | [diff] [blame] | 77 | <enum name="normal" value="0" /> |
| 78 | <enum name="bold" value="1" /> |
| 79 | <enum name="italic" value="2" /> |
Tadashi G. Takaoka | 5d04042 | 2010-12-01 12:22:19 +0900 | [diff] [blame] | 80 | <enum name="boldItalic" value="3" /> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 81 | </attr> |
| 82 | |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 83 | <attr name="colorScheme" format="enum"> |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 84 | <!-- This should be aligned with KeyboardView.COLOR_SCHEME_* --> |
Tadashi G. Takaoka | 59c9930 | 2010-11-21 16:40:38 -0800 | [diff] [blame] | 85 | <enum name="white" value="0" /> |
| 86 | <enum name="black" value="1" /> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 87 | </attr> |
| 88 | |
| 89 | </declare-styleable> |
| 90 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 91 | <declare-styleable name="Keyboard"> |
Tadashi G. Takaoka | 9f01ed5 | 2010-12-08 14:36:41 +0900 | [diff] [blame] | 92 | <!-- Default keyboard height --> |
| 93 | <attr name="keyboardHeight" format="dimension" /> |
| 94 | <!-- Maximum keyboard height, in pixels or percentage of display height --> |
| 95 | <attr name="maxKeyboardHeight" format="dimension|fraction" /> |
Tadashi G. Takaoka | ff483e8 | 2011-05-12 14:49:18 +0900 | [diff] [blame] | 96 | <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction |
| 97 | is positive, or percentage of display width if fraction is negative. --> |
| 98 | <attr name="minKeyboardHeight" format="dimension|fraction" /> |
Tadashi G. Takaoka | 327763e | 2011-05-30 20:05:50 +0900 | [diff] [blame] | 99 | <!-- Default width of a key, in pixels or percentage of display width. |
| 100 | If the value is zero, the actual key width will be determined to fill out the area up |
| 101 | to the right edge of the keyboard. |
| 102 | If the value is negative, the actual key width will be determined to fill out the |
| 103 | area between the nearest key on the left hand side and the right edge of the keyboard. |
| 104 | --> |
| 105 | <attr name="keyWidth" format="dimension|fraction|enum"> |
| 106 | <enum name="fillRight" value="0" /> |
| 107 | <enum name="fillBoth" value="-1" /> |
| 108 | </attr> |
Tadashi G. Takaoka | 9f01ed5 | 2010-12-08 14:36:41 +0900 | [diff] [blame] | 109 | <!-- Default height of a row (key height + vertical gap), in pixels or percentage of |
| 110 | keyboard height. --> |
| 111 | <attr name="rowHeight" format="dimension|fraction" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 112 | <!-- Default horizontal gap between keys. --> |
| 113 | <attr name="horizontalGap" format="dimension|fraction" /> |
| 114 | <!-- Default vertical gap between rows of keys. --> |
| 115 | <attr name="verticalGap" format="dimension|fraction" /> |
Tadashi G. Takaoka | 9b6d1d5 | 2010-12-14 15:31:47 +0900 | [diff] [blame] | 116 | <!-- Popup keyboard layout template --> |
| 117 | <attr name="popupKeyboardTemplate" format="reference" /> |
Tadashi G. Takaoka | b7758d6 | 2011-06-15 13:38:58 +0900 | [diff] [blame] | 118 | <!-- Popup hint icon --> |
| 119 | <attr name="popupHintIcon" format="reference" /> |
satok | 15a0ba6 | 2011-04-21 15:35:07 +0900 | [diff] [blame] | 120 | <!-- Locale of the keyboard layout --> |
| 121 | <attr name="keyboardLocale" format="string" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 122 | </declare-styleable> |
| 123 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 124 | <declare-styleable name="Keyboard_Key"> |
Tadashi G. Takaoka | c4f7166 | 2010-12-20 20:30:26 +0900 | [diff] [blame] | 125 | <!-- The unicode value that this key outputs. --> |
| 126 | <attr name="code" format="integer" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 127 | <!-- The characters to display in the popup keyboard. --> |
| 128 | <attr name="popupCharacters" format="string" /> |
Tadashi G. Takaoka | 9b6d1d5 | 2010-12-14 15:31:47 +0900 | [diff] [blame] | 129 | <!-- Maximum column of popup keyboard --> |
| 130 | <attr name="maxPopupKeyboardColumn" format="integer" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 131 | <!-- Key edge flags. --> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 132 | <attr name="keyEdgeFlags" format="integer"> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 133 | <!-- Key is anchored to the left of the keyboard. --> |
| 134 | <flag name="left" value="1" /> |
| 135 | <!-- Key is anchored to the right of the keyboard. --> |
| 136 | <flag name="right" value="2" /> |
| 137 | </attr> |
Tadashi G. Takaoka | e7c0e73 | 2011-04-07 16:12:00 +0900 | [diff] [blame] | 138 | <!-- Whether this is a functional key which has different key top than normal key. --> |
| 139 | <attr name="isFunctional" format="boolean" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 140 | <!-- Whether this is a toggle key. --> |
| 141 | <attr name="isSticky" format="boolean" /> |
| 142 | <!-- Whether long-pressing on this key will make it repeat. --> |
| 143 | <attr name="isRepeatable" format="boolean" /> |
| 144 | <!-- The icon to show in the popup preview. --> |
| 145 | <attr name="iconPreview" format="reference" /> |
| 146 | <!-- The string of characters to output when this key is pressed. --> |
| 147 | <attr name="keyOutputText" format="string" /> |
| 148 | <!-- The label to display on the key. --> |
| 149 | <attr name="keyLabel" format="string" /> |
Tadashi G. Takaoka | cd39f2a | 2010-11-20 08:03:24 -0800 | [diff] [blame] | 150 | <!-- The key label option --> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 151 | <attr name="keyLabelOption" format="integer"> |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 152 | <!-- This should be aligned with KeyboardView.KEY_LABEL_OPTION_* --> |
Tadashi G. Takaoka | b7758d6 | 2011-06-15 13:38:58 +0900 | [diff] [blame] | 153 | <flag name="alignLeft" value="0x01" /> |
| 154 | <flag name="alignRight" value="0x02" /> |
| 155 | <flag name="alignBottom" value="0x08" /> |
| 156 | <flag name="fontNormal" value="0x10" /> |
| 157 | <flag name="popupHint" value="0x20" /> |
Tadashi G. Takaoka | cd39f2a | 2010-11-20 08:03:24 -0800 | [diff] [blame] | 158 | </attr> |
Tadashi G. Takaoka | 10227a7 | 2010-11-13 00:16:34 -0800 | [diff] [blame] | 159 | <!-- The unicode that this key generates in manual temporary upper case mode. --> |
| 160 | <attr name="manualTemporaryUpperCaseCode" format="integer" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 161 | <!-- The icon to display on the key instead of the label. --> |
| 162 | <attr name="keyIcon" format="reference" /> |
Tadashi G. Takaoka | 66e306d | 2010-10-02 15:17:27 +0900 | [diff] [blame] | 163 | <!-- The hint icon to display on the key in conjunction with the label --> |
| 164 | <attr name="keyHintIcon" format="reference" /> |
Tadashi G. Takaoka | 10227a7 | 2010-11-13 00:16:34 -0800 | [diff] [blame] | 165 | <!-- The hint icon to display on the key when keyboard is in manual temporary upper case |
| 166 | mode. --> |
| 167 | <attr name="manualTemporaryUpperCaseHintIcon" format="reference" /> |
Tadashi G. Takaoka | 0b60f83 | 2010-11-19 14:57:24 -0800 | [diff] [blame] | 168 | <!-- The key style to specify a set of key attributes defined by <key_style/> --> |
| 169 | <attr name="keyStyle" format="string" /> |
Tadashi G. Takaoka | 7f0befe | 2010-11-23 23:59:56 -0800 | [diff] [blame] | 170 | <!-- Shift key icon for shifted state --> |
| 171 | <attr name="shiftedIcon" format="reference" /> |
Tadashi G. Takaoka | aa721c4 | 2011-02-18 11:28:17 +0900 | [diff] [blame] | 172 | <!-- The key is enabled and responds on press. --> |
| 173 | <attr name="enabled" format="boolean" /> |
Tadashi G. Takaoka | 56abeab | 2011-04-11 11:30:15 +0900 | [diff] [blame] | 174 | <!-- Visual insets --> |
| 175 | <attr name="visualInsetsLeft" format="dimension|fraction" /> |
| 176 | <attr name="visualInsetsRight" format="dimension|fraction" /> |
Tadashi G. Takaoka | 327763e | 2011-05-30 20:05:50 +0900 | [diff] [blame] | 177 | <!-- The X-coordinate of upper right corner of this key including horizontal gap. |
| 178 | If the value is negative, the origin is the right edge of the keyboard. --> |
| 179 | <attr name="keyXPos" format="dimension|fraction" /> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 180 | </declare-styleable> |
| 181 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 182 | <declare-styleable name="Keyboard_Row"> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 183 | <!-- Row edge flags. --> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 184 | <attr name="rowEdgeFlags" format="integer"> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 185 | <!-- Row is anchored to the top of the keyboard. --> |
| 186 | <flag name="top" value="4" /> |
| 187 | <!-- Row is anchored to the bottom of the keyboard. --> |
| 188 | <flag name="bottom" value="8" /> |
| 189 | </attr> |
satok | 4fc510a | 2010-10-01 19:40:44 +0900 | [diff] [blame] | 190 | </declare-styleable> |
Tadashi G. Takaoka | d663555 | 2010-10-07 17:13:30 +0900 | [diff] [blame] | 191 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 192 | <declare-styleable name="Keyboard_Include"> |
Tadashi G. Takaoka | d663555 | 2010-10-07 17:13:30 +0900 | [diff] [blame] | 193 | <attr name="keyboardLayout" format="reference" /> |
| 194 | </declare-styleable> |
Tadashi G. Takaoka | b046511 | 2010-11-11 15:28:14 -0800 | [diff] [blame] | 195 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 196 | <declare-styleable name="Keyboard_Case"> |
| 197 | <!-- This should be aligned with KeyboardId.MODE_* --> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 198 | <attr name="mode" format="enum|string"> |
Tadashi G. Takaoka | cd39f2a | 2010-11-20 08:03:24 -0800 | [diff] [blame] | 199 | <enum name="text" value="0" /> |
| 200 | <enum name="url" value="1" /> |
| 201 | <enum name="email" value="2" /> |
| 202 | <enum name="im" value="3" /> |
Tadashi G. Takaoka | 9e2d810 | 2011-05-27 21:41:13 +0900 | [diff] [blame] | 203 | <enum name="phone" value="4" /> |
| 204 | <enum name="number" value="5" /> |
Tadashi G. Takaoka | 1d8196c | 2010-11-19 14:57:24 -0800 | [diff] [blame] | 205 | </attr> |
Tadashi G. Takaoka | 9e2d810 | 2011-05-27 21:41:13 +0900 | [diff] [blame] | 206 | <attr name="webInput" format="boolean" /> |
Tadashi G. Takaoka | 4b13b4f | 2011-02-20 12:54:14 +0900 | [diff] [blame] | 207 | <attr name="passwordInput" format="boolean" /> |
Tadashi G. Takaoka | b7758d6 | 2011-06-15 13:38:58 +0900 | [diff] [blame] | 208 | <attr name="hasSettingsKey" format="boolean" /> |
| 209 | <attr name="voiceKeyEnabled" format="boolean" /> |
| 210 | <attr name="hasVoiceKey" format="boolean" /> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 211 | <attr name="imeAction" format="enum"> |
Tadashi G. Takaoka | 6624fd8 | 2010-11-19 16:04:52 -0800 | [diff] [blame] | 212 | <!-- This should be aligned with EditorInfo.IME_ACTION_* --> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 213 | <enum name="actionUnspecified" value="0" /> |
| 214 | <enum name="actionNone" value="1" /> |
| 215 | <enum name="actionGo" value="2" /> |
| 216 | <enum name="actionSearch" value="3" /> |
| 217 | <enum name="actionSend" value="4" /> |
| 218 | <enum name="actionNext" value="5" /> |
| 219 | <enum name="actionDone" value="6" /> |
| 220 | <enum name="actionPrevious" value="7" /> |
Tadashi G. Takaoka | 6624fd8 | 2010-11-19 16:04:52 -0800 | [diff] [blame] | 221 | </attr> |
Tadashi G. Takaoka | 5859205 | 2011-06-03 02:18:57 +0900 | [diff] [blame] | 222 | <attr name="localeCode" format="string" /> |
Tadashi G. Takaoka | ea6c2e3 | 2011-02-18 15:33:44 +0900 | [diff] [blame] | 223 | <attr name="languageCode" format="string" /> |
Tadashi G. Takaoka | 912ade3 | 2011-02-23 17:09:24 +0900 | [diff] [blame] | 224 | <attr name="countryCode" format="string" /> |
Tadashi G. Takaoka | b046511 | 2010-11-11 15:28:14 -0800 | [diff] [blame] | 225 | </declare-styleable> |
Tadashi G. Takaoka | 0b60f83 | 2010-11-19 14:57:24 -0800 | [diff] [blame] | 226 | |
Tadashi G. Takaoka | 5a309f5 | 2010-12-02 18:46:21 +0900 | [diff] [blame] | 227 | <declare-styleable name="Keyboard_KeyStyle"> |
Tadashi G. Takaoka | 0b60f83 | 2010-11-19 14:57:24 -0800 | [diff] [blame] | 228 | <attr name="styleName" format="string" /> |
| 229 | <attr name="parentStyle" format="string" /> |
| 230 | </declare-styleable> |
satok | 979f869 | 2010-08-20 14:35:02 +0900 | [diff] [blame] | 231 | </resources> |