aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/layout-devices.xsd
blob: a4ea6c42ef180e351be95d13203454fcc9a8b3cb (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
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
 *
 * 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.
-->
<xsd:schema
    targetNamespace="http://schemas.android.com/sdk/android/layout-devices/1"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://schemas.android.com/sdk/android/layout-devices/1"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1">

    <!-- The root element layout-devices defines a sequence of 0..n device elements. -->

    <xsd:element name="layout-devices" type="c:layoutDevicesType" />

    <xsd:complexType name="layoutDevicesType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The "layout-devices" element is the root element of this schema.

                It must contain zero or more "device" elements that each define the configurations
                available for a given device.

                These definitions are used in the Graphical Layout Editor in the
                Android Development Tools (ADT) plugin for Eclipse.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <!-- layout-devices defines a sequence of 0..n device elements. -->
            <xsd:element name="device" minOccurs="0" maxOccurs="unbounded">

                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        A device element must contain at most one "default" element
                        followed by one or more "config" elements.

                        The "default" element defines all the default parameters
                        inherited by the following "config" elements.
                        Each "config" element can override the default values, if any.

                        A "device" element also has a required "name" attribute that
                        represents the user-interface name of this device.
                    </xsd:documentation>
                </xsd:annotation>

                <xsd:complexType>
                    <!-- device defines a choice of 0..1 default element
                    and 1..n config elements. -->

                    <xsd:sequence>
                        <xsd:element name="default" type="c:parametersType"
                                     minOccurs="0"  maxOccurs="1" />
                        <xsd:element name="config"  type="c:configType"
                                     minOccurs="1"  maxOccurs="unbounded" />
                    </xsd:sequence>

                    <xsd:attribute name="name" type="xsd:normalizedString" use="required" />
                </xsd:complexType>

            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <!-- The type of a device>default element.
         This is overridden by configType below for the device>config element.
    -->
    <xsd:complexType name="parametersType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                The parametersType define all the parameters that can happen either in a
                "default" element or in a named "config" element.
                Each parameter element can appear once at most.

                Parameters here are the same as those used to specify alternate Android
                resources, as documented by
                http://d.android.com/guide/topics/resources/resources-i18n.html#AlternateResources
            </xsd:documentation>
        </xsd:annotation>

        <xsd:all>
            <!-- parametersType says that 0..1 of each of these elements must be declared. -->

            <xsd:element name="country-code" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the configuration is for a particular Mobile Country Code.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:float">
                        <xsd:minInclusive value="100" />
                        <xsd:maxInclusive value="999" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="network-code" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the configuration is for a particular Mobile Network Code.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:float">
                        <xsd:minExclusive value="0" />
                        <xsd:maxExclusive value="1000" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="screen-size" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies that the configuration is for a particular class of screen.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="small" />
                        <xsd:enumeration value="normal" />
                        <xsd:enumeration value="large" />
                        <xsd:enumeration value="xlarge" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="screen-ratio" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies that the configuration is for a taller/wider than traditional
                        screen. This is based purely on the aspect ration of the screen: QVGA,
                        HVGA, and VGA are notlong; WQVGA, WVGA, FWVGA are long. Note that long
                        may mean either wide or tall, depending on the current orientation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="long" />
                        <xsd:enumeration value="notlong" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="screen-orientation" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies that the configuration is for a screen that is tall (port) or
                        wide (land).
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="port" />
                        <xsd:enumeration value="land" />
                        <xsd:enumeration value="square" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="pixel-density" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the screen density the configuration is defined for. The medium
                        density of traditional HVGA screens (mdpi) is defined to be approximately
                        160dpi; low density (ldpi) is 120, and high density (hdpi) is 240. There
                        is thus a 4:3 scaling factor between each density, so a 9x9 bitmap in ldpi
                        would be 12x12 is mdpi and 16x16 in hdpi.
                        The special nodpi density that can be used in resource qualifiers is not
                        a valid keyword here.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="ldpi" />
                        <xsd:enumeration value="mdpi" />
                        <xsd:enumeration value="tvdpi" />
                        <xsd:enumeration value="hdpi" />
                        <xsd:enumeration value="xhdpi" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="touch-type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the touch type the configuration is defined for.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="notouch" />
                        <xsd:enumeration value="stylus" />
                        <xsd:enumeration value="finger" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="keyboard-state" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        If your configuration uses a soft keyboard, use the keyssoft value.
                        If it doesn't and has a real keyboard, use keysexposed or keyshidden.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="keysexposed" />
                        <xsd:enumeration value="keyshidden" />
                        <xsd:enumeration value="keyssoft" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="text-input-method" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the primary text input method the configuration is designed for.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="nokeys" />
                        <xsd:enumeration value="qwerty" />
                        <xsd:enumeration value="12key" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="nav-state" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies whether the primary non-touchscreen navigation control is
                        exposed or hidden.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="navexposed" />
                        <xsd:enumeration value="navhidden" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="nav-method" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the primary non-touchscreen navigation method the configuration
                        is designed for.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:token">
                        <xsd:enumeration value="dpad" />
                        <xsd:enumeration value="trackball" />
                        <xsd:enumeration value="wheel" />
                        <xsd:enumeration value="nonav" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="screen-dimension" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the device screen resolution, in pixels.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence minOccurs="2" maxOccurs="2">

                        <xsd:element name="size">
                            <xsd:simpleType>
                                <xsd:restriction base="xsd:positiveInteger" />
                            </xsd:simpleType>
                        </xsd:element>

                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="xdpi" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the actual density in X of the device screen.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:float">
                        <xsd:minExclusive value="0" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element name="ydpi" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="en">
                        Specifies the actual density in Y of the device screen.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:float">
                        <xsd:minExclusive value="0" />
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

        </xsd:all>
    </xsd:complexType>

    <!-- The type definition of a device>config element.
         This type is basically all the element defined by parametersType and an extra
         required "name" attribute for the user-interface configuration name.
    -->
    <xsd:complexType name="configType">
        <xsd:annotation>
            <xsd:documentation>
                The configType defines the content of a "config" element in a "device" element.

                A "config" element can have all the parameters elements defined by
                "parameterType". It also has a required "name" attribute that indicates the
                user-interface name for this configuration.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:complexContent>
            <xsd:extension base="c:parametersType">
                <xsd:attribute name="name" type="xsd:normalizedString" use="required" />
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

</xsd:schema>