• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2    <!--
3        Palette Metadata
4
5        This document provides additional designtime metadata for various Android views, such as
6        logical palette categories (as well as a natural ordering of the views within their
7        categories, fill-preferences (how a view will sets its width and height attributes when
8        dropped into other views), and so on.
9    -->
10<!DOCTYPE metadata [
11<!--- The metadata consists of a series of category definitions -->
12<!ELEMENT metadata (category)*>
13<!--- Each category has a name and contains a list of views in order -->
14<!ELEMENT category (view)*>
15<!ATTLIST category name CDATA #IMPLIED>
16<!--- Each view is identified by its full class name and has various
17      other attributes such as a fill preference  -->
18<!ELEMENT view (view)*>
19<!ATTLIST view
20    class CDATA #IMPLIED
21    name CDATA #IMPLIED
22    init CDATA #IMPLIED
23    icon CDATA #IMPLIED
24    relatedTo CDATA #IMPLIED
25    skip (true|false) "false"
26    render (alone|skip|normal) "normal"
27    fill (none|both|width|height|opposite|width_in_vertical|height_in_horizontal) "none"
28    resize (full|none|horizontal|vertical|scaled) "full"
29    topAttrs CDATA #IMPLIED
30>
31]>
32<metadata>
33    <category
34        name="Form Widgets">
35        <view
36            class="android.widget.TextView"
37            topAttrs="text,textAppearance,textColor,textSize"
38            name="TextView"
39            init=""
40            relatedTo="EditText,AutoCompleteTextView,MultiAutoCompleteTextView">
41            <view
42                name="Large Text"
43                init="android:textAppearance=?android:attr/textAppearanceLarge,android:text=Large Text" />
44            <view
45                name="Medium Text"
46                init="android:textAppearance=?android:attr/textAppearanceMedium,android:text=Medium Text" />
47            <view
48                name="Small Text"
49                init="android:textAppearance=?android:attr/textAppearanceSmall,android:text=Small Text" />
50        </view>
51        <view
52            class="android.widget.Button"
53            topAttrs="text,style"
54            name="Button"
55            init=""
56            relatedTo="ImageButton">
57            <view
58                name="Small Button"
59                init="style=?android:attr/buttonStyleSmall,android:text=Button" />
60        </view>
61        <view
62            class="android.widget.ToggleButton"
63            topAttrs="textOff,textOn,style,background"
64            relatedTo="CheckBox" />
65        <view
66            class="android.widget.CheckBox"
67            topAttrs="text"
68            relatedTo="RadioButton,ToggleButton,CheckedTextView" />
69        <view
70            class="android.widget.RadioButton"
71            topAttrs="text,style"
72            relatedTo="CheckBox,ToggleButton" />
73        <view
74            class="android.widget.CheckedTextView"
75            topAttrs="gravity,paddingLeft,paddingRight,checkMark,textAppearance"
76            relatedTo="TextView,CheckBox" />
77        <view
78            class="android.widget.Spinner"
79            topAttrs="prompt,entries,style"
80            relatedTo="EditText"
81            fill="width_in_vertical" />
82        <view
83            class="android.widget.ProgressBar"
84            topAttrs="style,visibility,indeterminate,max"
85            relatedTo="SeekBar"
86            name="ProgressBar (Large)"
87            init="style=?android:attr/progressBarStyleLarge"
88            resize="scaled" >
89            <view
90                name="ProgressBar (Normal)"
91                init=""
92                resize="scaled" />
93            <view
94                name="ProgressBar (Small)"
95                init="style=?android:attr/progressBarStyleSmall"
96                resize="scaled" />
97            <view
98                name="ProgressBar (Horizontal)"
99                init="style=?android:attr/progressBarStyleHorizontal"
100                resize="horizontal" />
101        </view>
102        <view
103            class="android.widget.SeekBar"
104            topAttrs="paddingLeft,paddingRight,progressDrawable,thumb"
105            relatedTo="ProgressBar"
106            resize="horizontal"
107            fill="width_in_vertical" />
108        <view
109            class="android.widget.QuickContactBadge"
110            topAttrs="src,style,gravity"
111            resize="scaled" />
112        <view
113            class="android.widget.RadioGroup"
114            topAttrs="orientation,paddingBottom,paddingTop,style" />
115        <view
116            class="android.widget.RatingBar"
117            topAttrs="numStars,stepSize,style,isIndicator"
118            resize="horizontal" />
119        <view
120            class="android.widget.Switch"
121            topAttrs="text,textOff,textOn,style,checked"
122            relatedTo="CheckBox,ToggleButton"
123            render="alone" />
124    </category>
125    <category
126        name="Text Fields">
127        <view
128            class="android.widget.EditText"
129            topAttrs="hint,inputType,singleLine"
130            name="Plain Text"
131            init=""
132            resize="full"
133            relatedTo="Spinner,TextView,AutoCompleteTextView,MultiAutoCompleteTextView"
134            fill="width_in_vertical">
135            <view
136                name="Person Name"
137                init="android:inputType=textPersonName" />
138            <view
139                name="Password"
140                init="android:inputType=textPassword" />
141            <view
142                name="Password (Numeric)"
143                init="android:inputType=numberPassword" />
144            <view
145                name="E-mail"
146                init="android:inputType=textEmailAddress" />
147            <view
148                name="Phone"
149                init="android:inputType=phone" />
150            <view
151                name="Postal Address"
152                resize="full"
153                init="android:inputType=textPostalAddress" />
154            <view
155                name="Multiline Text"
156                resize="full"
157                init="android:inputType=textMultiLine" />
158            <view
159                name="Time"
160                init="android:inputType=time" />
161            <view
162                name="Date"
163                init="android:inputType=date" />
164            <view
165                name="Number"
166                init="android:inputType=number" />
167            <view
168                name="Number (Signed)"
169                init="android:inputType=numberSigned" />
170            <view
171                name="Number (Decimal)"
172                init="android:inputType=numberDecimal" />
173        </view>
174        <view
175            class="android.widget.AutoCompleteTextView"
176            topAttrs="singleLine,autoText"
177            fill="width_in_vertical" />
178        <view
179            class="android.widget.MultiAutoCompleteTextView"
180            topAttrs="background,hint,imeOptions,inputType,style,textColor"
181            fill="width_in_vertical" />
182    </category>
183    <category
184        name="Layouts">
185        <view
186            class="android.widget.GridLayout"
187            fill="opposite"
188            render="skip" />
189        <view
190            class="android.widget.LinearLayout"
191            topAttrs="orientation,gravity"
192            name="LinearLayout (Vertical)"
193            init="android:orientation=vertical"
194            icon="VerticalLinearLayout"
195            fill="opposite"
196            render="skip">
197            <view
198                name="LinearLayout (Horizontal)" />
199        </view>
200        <view
201            class="android.widget.RelativeLayout"
202            topAttrs="background,orientation,paddingLeft"
203            fill="opposite"
204            render="skip" />
205        <view
206            class="android.widget.FrameLayout"
207            topAttrs="background"
208            fill="opposite"
209            render="skip" />
210        <view
211            class="include"
212            topAttrs="layout"
213            name="Include Other Layout"
214            render="skip"
215            relatedTo="fragment" />
216        <view
217            class="fragment"
218            topAttrs="class,name"
219            name="Fragment"
220            fill="opposite"
221            render="skip"
222            relatedTo="include" />
223        <view
224            class="android.widget.TableLayout"
225            topAttrs="stretchColumns,shrinkColumns,orientation"
226            fill="opposite"
227            render="skip" />
228        <view
229            class="android.widget.TableRow"
230            topAttrs="paddingTop,focusable,gravity,visibility"
231            fill="opposite"
232            resize="vertical"
233            render="skip" />
234        <view
235            class="android.widget.Space"
236            fill="opposite"
237            render="skip" />
238    </category>
239    <category
240        name="Composite">
241        <view
242            class="android.widget.ListView"
243            topAttrs="drawSelectorOnTop,cacheColorHint,divider,background"
244            relatedTo="ExpandableListView"
245            fill="width_in_vertical" />
246        <view
247            class="android.widget.ExpandableListView"
248            topAttrs="drawSelectorOnTop,cacheColorHint,indicatorLeft,indicatorRight,scrollbars,textSize"
249            relatedTo="ListView"
250            fill="width_in_vertical" />
251        <view
252            class="android.widget.GridView"
253            topAttrs="numColumns,verticalSpacing,horizontalSpacing"
254            fill="opposite"
255            render="skip" />
256        <view
257            class="android.widget.ScrollView"
258            topAttrs="fillViewport,orientation,scrollbars"
259            relatedTo="HorizontalScrollView"
260            fill="opposite"
261            render="skip" />
262        <view
263            class="android.widget.HorizontalScrollView"
264            topAttrs="scrollbars,fadingEdgeLength,fadingEdge"
265            relatedTo="ScrollView"
266            render="skip" />
267        <view
268            class="android.widget.SearchView"
269            topAttrs="iconifiedByDefault,queryHint,maxWidth,minWidth,visibility"
270            render="skip" />
271        <view
272            class="android.widget.SlidingDrawer"
273            render="skip"
274            topAttrs="allowSingleTap,bottomOffset,content,handle,topOffset,visibility" />
275        <view
276            class="android.widget.TabHost"
277            topAttrs="paddingTop,background,duplicateParentState,visibility"
278            fill="width_in_vertical"
279            render="alone" />
280        <view
281            class="android.widget.TabWidget"
282            topAttrs="background,paddingLeft,tabStripEnabled,gravity"
283            render="alone" />
284        <view
285            class="android.webkit.WebView"
286            topAttrs="background,visibility,textAppearance"
287            fill="opposite"
288            render="skip" />
289    </category>
290    <category
291        name="Images &amp; Media">
292        <view
293            class="android.widget.ImageView"
294            topAttrs="src,scaleType"
295            resize="scaled"
296            render="skip"
297            relatedTo="ImageButton,VideoView" />
298        <view
299            class="android.widget.ImageButton"
300            topAttrs="src,background,style"
301            resize="scaled"
302            render="skip"
303            relatedTo="Button,ImageView" />
304        <view
305            class="android.widget.Gallery"
306            topAttrs="gravity,spacing,background"
307            fill="width_in_vertical"
308            render="skip" />
309        <view
310            class="android.widget.MediaController"
311            render="skip" />
312        <view
313            class="android.widget.VideoView"
314            relatedTo="ImageView"
315            fill="opposite"
316            render="skip" />
317    </category>
318    <category
319        name="Time &amp; Date">
320        <view
321            class="android.widget.TimePicker"
322            topAttrs="visibility"
323            relatedTo="DatePicker,CalendarView"
324            render="alone" />
325        <view
326            class="android.widget.DatePicker"
327            relatedTo="TimePicker"
328            render="alone" />
329        <view
330            class="android.widget.CalendarView"
331            topAttrs="focusable,focusableInTouchMode,visibility"
332            fill="both"
333            relatedTo="TimePicker,DatePicker" />
334        <view
335            class="android.widget.Chronometer"
336            topAttrs="textSize,gravity,visibility"
337            render="skip" />
338        <view
339            class="android.widget.AnalogClock"
340            topAttrs="dial,hand_hour,hand_minute"
341            relatedTo="DigitalClock" />
342        <view
343            class="android.widget.DigitalClock"
344            relatedTo="AnalogClock" />
345    </category>
346    <category
347        name="Transitions">
348        <view
349            class="android.widget.ImageSwitcher"
350            topAttrs="inAnimation,outAnimation,cropToPadding,padding,scaleType"
351            relatedTo="ViewFlipper,ViewSwitcher,TextSwitcher"
352            render="skip" />
353        <view
354            class="android.widget.AdapterViewFlipper"
355            topAttrs="autoStart,flipInterval,inAnimation,outAnimation"
356            fill="opposite"
357            render="skip" />
358        <view
359            class="android.widget.StackView"
360            topAttrs="loopViews,gravity"
361            fill="opposite"
362            render="skip" />
363        <view
364            class="android.widget.TextSwitcher"
365            relatedTo="ViewFlipper,ImageSwitcher,ViewSwitcher"
366            fill="opposite"
367            render="skip" />
368        <view
369            class="android.widget.ViewAnimator"
370            topAttrs="inAnimation,outAnimation"
371            fill="opposite"
372            render="skip" />
373        <view
374            class="android.widget.ViewFlipper"
375            topAttrs="flipInterval,inAnimation,outAnimation,addStatesFromChildren,measureAllChildren"
376            relatedTo="ViewSwitcher,ImageSwitcher,TextSwitcher"
377            fill="opposite"
378            render="skip" />
379        <view
380            class="android.widget.ViewSwitcher"
381            topAttrs="inAnimation,outAnimation"
382            relatedTo="ViewFlipper,ImageSwitcher,TextSwitcher"
383            fill="opposite"
384            render="skip" />
385    </category>
386    <category
387        name="Advanced">
388        <view
389            class="requestFocus"
390            render="skip" />
391        <view
392            class="android.view.View"
393            topAttrs="background,visibility,style"
394            render="skip" />
395        <view
396            class="android.view.ViewStub"
397            topAttrs="layout,inflatedId,visibility"
398            render="skip" />
399        <view
400            class="view"
401            topAttrs="class"
402            render="skip" />
403        <view
404            class="android.gesture.GestureOverlayView"
405            topAttrs="gestureStrokeType,uncertainGestureColor,eventsInterceptionEnabled,gestureColor,orientation"
406            render="skip" />
407        <view
408            class="android.view.TextureView"
409            render="skip" />
410        <view
411            class="android.view.SurfaceView"
412            render="skip" />
413        <view
414            class="android.widget.NumberPicker"
415            topAttrs="focusable,focusableInTouchMode"
416            relatedTo="TimePicker,DatePicker"
417            render="alone" />
418        <view
419            class="android.widget.ZoomButton"
420            topAttrs="background"
421            relatedTo="Button,ZoomControls" />
422        <view
423            class="android.widget.ZoomControls"
424            topAttrs="style,background,gravity"
425            relatedTo="ZoomButton"
426            resize="none" />
427        <view
428            class="merge"
429            topAttrs="orientation,gravity,style"
430            skip="true"
431            render="skip" />
432        <view
433            class="android.widget.DialerFilter"
434            fill="width_in_vertical"
435            render="skip" />
436        <view
437            class="android.widget.TwoLineListItem"
438            topAttrs="mode,paddingBottom,paddingTop,minHeight,paddingLeft"
439            render="skip" />
440        <view
441            class="android.widget.AbsoluteLayout"
442            topAttrs="background,orientation,paddingBottom,paddingLeft,paddingRight,paddingTop"
443            name="AbsoluteLayout (Deprecated)"
444            fill="opposite"
445            render="skip" />
446    </category>
447    <category
448        name="Other">
449        <!--  This is the catch-all category which contains unknown views if we encounter any -->
450    </category>
451    <!--  TODO: Add-ons? -->
452</metadata>
453