aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml
blob: db77e174997b51937c5bf303dbb70c34390bda63 (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
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2008 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>
    <!-- WARNING !!! THIS IS A MOCK FILE. DO NOT USE FOR DOCUMENTATION PURPOSES.
         This file has been trimmed down to only extract a number of interesting cases 
         for unit tests.
         
         What this contains:
         - View
         - ViewGroup
         - some attributes which format are defined in Theme
         - orientation, gravity and layout_gravity defined before they are used
         - ViewGroup_Layout
         - ViewGroup_MarginLayout
         - LinearLayout
         - LinearLayout_Layout
         - TableLayout
         
         Note that TableLayout does not have a TableLayout_Layout definition here
         where these is a class TableLayout.LayoutData.
    -->

    <!-- These are the standard attributes that make up a complete theme. -->
    <declare-styleable name="Theme">

        <!-- Defines the scrollbars size. -->
        <attr name="scrollbarSize" format="dimension" />

    </declare-styleable>

        
    <!-- Standard orientation constant. -->
    <attr name="orientation">
        <!-- Defines an horizontal widget. -->
        <enum name="horizontal" value="0" />
        <!-- Defines a vertical widget. -->
        <enum name="vertical" value="1" />
    </attr>

    <!-- Specifies how to place an object, both
         its x and y axis, within a larger containing object. -->
    <attr name="gravity">
        <!-- Push object to the top of its container, not changing its size. -->
        <flag name="top" value="0x30" />
        <!-- Push object to the bottom of its container, not changing its size. -->
        <flag name="bottom" value="0x50" />
        <!-- Push object to the left of its container, not changing its size. -->
        <flag name="left" value="0x03" />
        <!-- Push object to the right of its container, not changing its size. -->
        <flag name="right" value="0x05" />
        <!-- Place object in the vertical center of its container, not changing its size. -->
        <flag name="center_vertical" value="0x10" />
        <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
        <flag name="fill_vertical" value="0x70" />
        <!-- Place object in the horizontal center of its container, not changing its size. -->
        <flag name="center_horizontal" value="0x01" />
        <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
        <flag name="fill_horizontal" value="0x07" />
        <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
        <flag name="center" value="0x11" />
        <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
        <flag name="fill" value="0x77" />
    </attr>

    <!-- Standard gravity constant that a child can supply to its parent.
         Defines how to place an object, both
         its x and y axis, within a larger containing object. -->
    <attr name="layout_gravity">
        <!-- Push object to the top of its container, not changing its size. -->
        <flag name="top" value="0x30" />
        <!-- Push object to the bottom of its container, not changing its size. -->
        <flag name="bottom" value="0x50" />
        <!-- Push object to the left of its container, not changing its size. -->
        <flag name="left" value="0x03" />
        <!-- Push object to the right of its container, not changing its size. -->
        <flag name="right" value="0x05" />
        <!-- Place object in the vertical center of its container, not changing its size. -->
        <flag name="center_vertical" value="0x10" />
        <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
        <flag name="fill_vertical" value="0x70" />
        <!-- Place object in the horizontal center of its container, not changing its size. -->
        <flag name="center_horizontal" value="0x01" />
        <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
        <flag name="fill_horizontal" value="0x07" />
        <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
        <flag name="center" value="0x11" />
        <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
        <flag name="fill" value="0x77" />
    </attr>

    <declare-styleable name="View">
    <!-- NOTE: View does not have a javadoc. Do not place a comment BEFORE View to make sure it
         is NOT interpreted as Javadoc -->
    
        <!-- Supply an identifier name for this view, to later retrieve it
             with {@link android.view.View#findViewById View.findViewById()} or
             {@link android.app.Activity#findViewById Activity.findViewById()}.
             This must be a
             resource reference; typically you set this using the
             <code>@+</code> syntax to create a new ID resources.
             For example: <code>android:id="@+id/my_id"</code> which
             allows you to later retrieve the view
             with <code>findViewById(R.id.my_id)</code>. -->
        <attr name="id" format="reference" />
        
        <!-- Supply a tag for this view containing a String, to be retrieved
             later with {@link android.view.View#getTag View.getTag()} or
             searched for with {@link android.view.View#findViewWithTag
             View.findViewWithTag()}.  It is generally preferable to use
             IDs (through the android:id attribute) instead of tags because
             they are faster and allow for compile-time type checking. -->
        <attr name="tag" format="string" />
        
        <!-- The initial horizontal scroll offset, in pixels.-->
        <attr name="scrollX" format="dimension" />

        <!-- The initial vertical scroll offset, in pixels. -->
        <attr name="scrollY" format="dimension" />

        <!-- A drawable to use as the background.  This can be either a reference
             to a full drawable resource (such as a PNG image, 9-patch,
             XML state list description, etc), or a solid color such as "#ff000000"
            (black). -->
        <attr name="background" format="reference|color" />

        <!-- Boolean that controls whether a view can take focus.  By default the user can not
             move focus to a view; by setting this attribute to true the view is
             allowed to take focus.  This value does not impact the behavior of
             directly calling {@link android.view.View#requestFocus}, which will
             always request focus regardless of this view.  It only impacts where
             focus navigation will try to move focus. -->
        <attr name="focusable" format="boolean" />

        <!-- Sets the circumstances under which this view will take focus. There are
             two choices: "weak" or "normal". The default value is "normal" for
             any focusable views. The focus type only applies if the view
             has been set to be focusable. -->
        <attr name="focusType">
            <!-- This view is focusable, but only if none of its descendants are already focused. -->
            <enum name="normal" value="0" />
            <!-- This view will always claim to be focusable. -->
            <enum name="weak" value="1" />
        </attr>
        
        <!-- Controls the initial visibility of the view.  -->
        <attr name="visibility">
            <!-- Visible on screen; the default value. -->
            <enum name="visible" value="0" />
            <!-- Not displayed, but taken into account during layout (space is left for it). -->
            <enum name="invisible" value="1" />
            <!-- Completely hidden, as if the view had not been added. -->
            <enum name="gone" value="2" />
        </attr>

        <!-- Defines which scrollbars should be displayed on scrolling or not. -->
        <attr name="scrollbars">
            <!-- No scrollbar is displayed. -->
            <flag name="none" value="0x00000000" />
            <!-- Displays horizontal scrollbar only. -->
            <flag name="horizontal" value="0x00000100" />
            <!-- Displays vertical scrollbar only. -->
            <flag name="vertical" value="0x00000200" />
        </attr>

        <!-- Sets the width of vertical scrollbars and height of horizontal scrollbars. -->
        <attr name="scrollbarSize" />
        
        <!-- Text to display. (copied from TextView for the extra localization) -->
        <attr name="text" format="string" localization="suggested" />
        
    </declare-styleable>

    <!-- Attributes that can be used with a {@link android.view.ViewGroup} or any
         of its subclasses.  Also see {@link #ViewGroup_Layout} for
         attributes that this class processes in its children. -->
    <declare-styleable name="ViewGroup">
        <!-- Defines whether a child is limited to draw inside of its bounds or not.
             This is useful with animations that scale the size of the children to more
             than 100% for instance. In such a case, this property should be set to false
             to allow the children to draw outside of their bounds. The default value of
             this property is true. -->
        <attr name="clipChildren" format="boolean" />
        <!-- Defines the layout animation to use the first time the ViewGroup is laid out.
             Layout animations can also be started manually after the first layout. -->
        <attr name="layoutAnimation" format="reference" />
        <!-- Defines whether a child's animation should be kept when it is over. Keeping
             the animations is useful with animation whose final state is different from
             the initial state of the View. This is particularly useful with animation
             whose fillAfter property is enabled. This property is set to false by default. -->
        <attr name="persistentDrawingCache">
            <!-- The drawing cache is not persisted after use. -->
            <flag name="none" value="0x0" />
            <!-- The drawing cache is persisted after a layout animation. -->
            <flag name="animation" value="0x1" />
            <!-- The drawing cache is persisted after a scroll. -->
            <flag name="scrolling" value="0x2" />
            <!-- The drawing cache is always persisted. -->            
            <flag name="all" value="0x3" />
        </attr>
    </declare-styleable>

    <!-- This is the basic set of layout attributes that are common to all
         layout managers.  These attributes are specified with the rest of
         a view's normal attributes (such as {@link android.R.attr#background},
         but will be parsed by the view's parent and ignored by the child.
        <p>The values defined here correspond to the base layout attribute
        class {@link android.view.ViewGroup.LayoutParams}. -->
    <declare-styleable name="ViewGroup_Layout">
        <!-- Specifies the basic width of the view.  This is a required attribute
             for any view inside of a containing layout manager.  Its value may
             be a dimension (such as "12dip") for a constant width or one of
             the special constants. -->
        <attr name="layout_width" format="dimension">
            <!-- The view should be as big as its parent (minus padding). -->
            <enum name="match_parent" value="-1" />
            <!-- The view should be only big enough to enclose its content (plus padding). -->
            <enum name="wrap_content" value="-2" />
        </attr>

        <!-- Specifies the basic height of the view.  This is a required attribute
             for any view inside of a containing layout manager.  Its value may
             be a dimension (such as "12dip") for a constant height or one of
             the special constants. -->
        <attr name="layout_height" format="dimension">
            <!-- The view should be as big as its parent (minus padding). -->
            <enum name="match_parent" value="-1" />
            <!-- The view should be only big enough to enclose its content (plus padding). -->
            <enum name="wrap_content" value="-2" />
        </attr>
    </declare-styleable>

    <!-- This is the basic set of layout attributes for layout managers that
         wish to place margins around their child views.
         These attributes are specified with the rest of
         a view's normal attributes (such as {@link android.R.attr#background},
         but will be parsed by the view's parent and ignored by the child.
        <p>The values defined here correspond to the base layout attribute
        class {@link android.view.ViewGroup.MarginLayoutParams}. -->
    <declare-styleable name="ViewGroup_MarginLayout">
        <attr name="layout_width" />
        <attr name="layout_height" />
        <!--  Specifies extra space on the left side of this view.
            This space is outside this view's bounds. -->
        <attr name="layout_marginLeft" format="dimension"  />
        <!--  Specifies extra space on the top side of this view.
            This space is outside this view's bounds. -->
        <attr name="layout_marginTop" format="dimension" />
        <!--  Specifies extra space on the right side of this view.
            This space is outside this view's bounds. -->
        <attr name="layout_marginRight" format="dimension"  />
        <!--  Specifies extra space on the bottom side of this view.
            This space is outside this view's bounds. -->
        <attr name="layout_marginBottom" format="dimension"  />
    </declare-styleable>

    <!-- This is a linear layout. -->
    <declare-styleable name="LinearLayout">
        <!-- Should the layout be a column or a row?  Use "horizontal"
             for a row, "vertical" for a column.  The default is
             horizontal. -->
        <attr name="orientation" />
        <attr name="baselineAligned" format="boolean|reference" />
        <!-- When a linear layout is part of another layout that is baseline
          aligned, it can specify which of its children to baseline align to
          (i.e which child TextView).-->
        <attr name="baselineAlignedChildIndex" format="integer|color" min="0"/>
        <!-- Defines the maximum weight sum. If unspecified, the sum is computed
             by adding the layout_weight of all of the children. This can be
             used for instance to give a single child 50% of the total available
             space by giving it a layout_weight of 0.5 and setting the weightSum
             to 1.0. -->
        <attr name="weightSum" format="float" />
    </declare-styleable>

    <declare-styleable name="LinearLayout_Layout">
        <attr name="layout_width" />
        <attr name="layout_height" />
        <attr name="layout_weight" format="float" />
        <attr name="layout_gravity" />
    </declare-styleable>

    <declare-styleable name="TableLayout">
        <!-- The 0 based index of the columns to stretch. The column indices
             must be separated by a comma: 1, 2, 5. Illegal and duplicate
             indices are ignored. You can stretch all columns by using the
             value "*" instead. Note that a column can be marked stretchable
             and shrinkable at the same time. -->
        <attr name="stretchColumns" format="string" />
       <!-- The 0 based index of the columns to shrink. The column indices
             must be separated by a comma: 1, 2, 5. Illegal and duplicate
             indices are ignored. You can shrink all columns by using the
             value "*" instead. Note that a column can be marked stretchable
             and shrinkable at the same time. -->
        <attr name="shrinkColumns" format="string" /> 
        <!-- The 0 based index of the columns to collapse. The column indices
             must be separated by a comma: 1, 2, 5. Illegal and duplicate
             indices are ignored. -->
        <attr name="collapseColumns" format="string" />
    </declare-styleable>

	<!-- Test for deprecated attributes. -->
	<declare-styleable name="DeprecatedTest">
		<!-- Deprecated comments using delimiters.
			 Ignored. {@deprecated In-line deprecated.} {@ignore Ignored}.
		 -->
		<attr name="deprecated-inline" /> 

		<!-- Deprecated comments on their own line.
			 @deprecated Multi-line version of deprecated
			    that works till the next tag.
			 @ignore This tag must be ignored
		 -->
		<attr name="deprecated-multiline" />
		
		<!-- This attribute is not deprecated. -->
		<attr name="deprecated-not" />
		
        <!-- {@deprecated There is no other javadoc here. } -->
        <attr name="deprecated-no-javadoc" format="boolean" />
		
	</declare-styleable>

</resources>