attrs.xml revision 16e8d4dd91083260223c007c797e46bc8f631055
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2012 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    <!-- Many app-specific attributes are declared in this file.
19         Unless otherwise specified, they are intended to be set within
20         the context of a theme declaration.
21
22         Each cluster of attributes below states whether it is meant to
23         be set by the app and read by the system, or set by the system and
24         read by the app. -->
25    <eat-comment/>
26
27
28    <attr name="title" format="string"/>
29    <attr name="height" format="dimension"/>
30    <!-- Specifies whether the theme is light, otherwise it is dark. -->
31    <attr name="isLightTheme" format="boolean" />
32
33    <!-- These are the standard attributes that make up a complete theme. -->
34    <declare-styleable name="Theme">
35
36        <!-- ============= -->
37        <!-- Window styles -->
38        <!-- ============= -->
39        <eat-comment />
40
41        <!-- Flag indicating whether this window should have an Action Bar
42             in place of the usual title bar. -->
43        <attr name="windowActionBar" format="boolean" />
44
45        <!-- Flag indicating whether this window's Action Bar should overlay
46             application content. Does nothing if the window would not
47             have an Action Bar. -->
48        <attr name="windowActionBarOverlay" format="boolean" />
49
50        <!-- Flag indicating whether action modes should overlay window content
51             when there is not reserved space for their UI (such as an Action Bar). -->
52        <attr name="windowActionModeOverlay" format="boolean" />
53
54        <!-- A fixed width for the window along the major axis of the screen,
55             that is, when in landscape. Can be either an absolute dimension
56             or a fraction of the screen size in that dimension. -->
57        <attr name="windowFixedWidthMajor" format="dimension|fraction" />
58        <!-- A fixed height for the window along the minor axis of the screen,
59             that is, when in landscape. Can be either an absolute dimension
60             or a fraction of the screen size in that dimension. -->
61        <attr name="windowFixedHeightMinor" format="dimension|fraction" />
62
63        <!-- A fixed width for the window along the minor axis of the screen,
64             that is, when in portrait. Can be either an absolute dimension
65             or a fraction of the screen size in that dimension. -->
66        <attr name="windowFixedWidthMinor" format="dimension|fraction" />
67        <!-- A fixed height for the window along the major axis of the screen,
68             that is, when in portrait. Can be either an absolute dimension
69             or a fraction of the screen size in that dimension. -->
70        <attr name="windowFixedHeightMajor" format="dimension|fraction" />
71
72        <attr name="android:windowIsFloating" />
73        <attr name="android:windowAnimationStyle" />
74
75        <!-- =================== -->
76        <!-- Action bar styles   -->
77        <!-- =================== -->
78        <eat-comment />
79        <!-- Default style for tabs within an action bar -->
80        <attr name="actionBarTabStyle" format="reference" />
81        <attr name="actionBarTabBarStyle" format="reference" />
82        <attr name="actionBarTabTextStyle" format="reference" />
83        <attr name="actionOverflowButtonStyle" format="reference" />
84        <attr name="actionOverflowMenuStyle" format="reference" />
85        <!-- Reference to a theme that should be used to inflate popups
86             shown by widgets in the action bar. -->
87        <attr name="actionBarPopupTheme" format="reference" />
88        <!-- Reference to a style for the Action Bar -->
89        <attr name="actionBarStyle" format="reference" />
90        <!-- Reference to a style for the split Action Bar. This style
91             controls the split component that holds the menu/action
92             buttons. actionBarStyle is still used for the primary
93             bar. -->
94        <attr name="actionBarSplitStyle" format="reference" />
95        <!-- Reference to a theme that should be used to inflate the
96             action bar. This will be inherited by any widget inflated
97             into the action bar. -->
98        <attr name="actionBarTheme" format="reference" />
99        <!-- Reference to a theme that should be used to inflate widgets
100             and layouts destined for the action bar. Most of the time
101             this will be a reference to the current theme, but when
102             the action bar has a significantly different contrast
103             profile than the rest of the activity the difference
104             can become important. If this is set to @null the current
105             theme will be used.-->
106        <attr name="actionBarWidgetTheme" format="reference" />
107        <!-- Size of the Action Bar, including the contextual
108             bar used to present Action Modes. -->
109        <attr name="actionBarSize" format="dimension" >
110            <enum name="wrap_content" value="0" />
111        </attr>
112        <!-- Custom divider drawable to use for elements in the action bar. -->
113        <attr name="actionBarDivider" format="reference" />
114        <!-- Custom item state list drawable background for action bar items. -->
115        <attr name="actionBarItemBackground" format="reference" />
116        <!-- TextAppearance style that will be applied to text that
117             appears within action menu items. -->
118        <attr name="actionMenuTextAppearance" format="reference" />
119        <!-- Color for text that appears within action menu items. -->
120        <!-- Color for text that appears within action menu items. -->
121        <attr name="actionMenuTextColor" format="color|reference"/>
122
123
124        <!-- =================== -->
125        <!-- Action mode styles  -->
126        <!-- =================== -->
127        <eat-comment/>
128        <attr name="actionModeStyle" format="reference"/>
129        <attr name="actionModeCloseButtonStyle" format="reference"/>
130        <!-- Background drawable to use for action mode UI -->
131        <attr name="actionModeBackground" format="reference"/>
132        <!-- Background drawable to use for action mode UI in the lower split bar -->
133        <attr name="actionModeSplitBackground" format="reference"/>
134        <!-- Drawable to use for the close action mode button -->
135        <attr name="actionModeCloseDrawable" format="reference"/>
136        <!-- Drawable to use for the Cut action button in Contextual Action Bar -->
137        <attr name="actionModeCutDrawable" format="reference"/>
138        <!-- Drawable to use for the Copy action button in Contextual Action Bar -->
139        <attr name="actionModeCopyDrawable" format="reference"/>
140        <!-- Drawable to use for the Paste action button in Contextual Action Bar -->
141        <attr name="actionModePasteDrawable" format="reference"/>
142        <!-- Drawable to use for the Select all action button in Contextual Action Bar -->
143        <attr name="actionModeSelectAllDrawable" format="reference"/>
144        <!-- Drawable to use for the Share action button in WebView selection action modes -->
145        <attr name="actionModeShareDrawable" format="reference"/>
146        <!-- Drawable to use for the Find action button in WebView selection action modes -->
147        <attr name="actionModeFindDrawable" format="reference"/>
148        <!-- Drawable to use for the Web Search action button in WebView selection action modes -->
149        <attr name="actionModeWebSearchDrawable" format="reference"/>
150
151        <!-- PopupWindow style to use for action modes when showing as a window overlay. -->
152        <attr name="actionModePopupWindowStyle" format="reference"/>
153
154
155        <!-- =================== -->
156        <!-- Text styles -->
157        <!-- =================== -->
158        <eat-comment />
159        <!-- Text color, typeface, size, and style for the text inside of a popup menu. -->
160        <attr name="textAppearanceLargePopupMenu" format="reference"/>
161        <!-- Text color, typeface, size, and style for small text inside of a popup menu. -->
162        <attr name="textAppearanceSmallPopupMenu" format="reference"/>
163
164
165        <!-- =================== -->
166        <!-- Dialog styles -->
167        <!-- =================== -->
168        <eat-comment />
169
170        <!-- Theme to use for dialogs spawned from this theme. -->
171        <attr name="dialogTheme" format="reference" />
172        <!-- Preferred padding for dialog content. -->
173        <attr name="dialogPreferredPadding" format="dimension" />
174
175
176        <!-- =================== -->
177        <!-- Other widget styles -->
178        <!-- =================== -->
179        <eat-comment />
180
181        <!-- Default ActionBar dropdown style. -->
182        <attr name="actionDropDownStyle" format="reference"/>
183        <!-- The preferred item height for dropdown lists. -->
184        <attr name="dropdownListPreferredItemHeight" format="dimension"/>
185
186        <!-- Default Spinner style. -->
187        <attr name="spinnerStyle" format="reference" />
188        <!-- Default Spinner style. -->
189        <attr name="spinnerDropDownItemStyle" format="reference" />
190        <!-- Specifies a drawable to use for the 'home as up' indicator. -->
191        <attr name="homeAsUpIndicator" format="reference"/>
192
193        <!-- Default action button style. -->
194        <attr name="actionButtonStyle" format="reference"/>
195
196        <!-- A style that may be applied to horizontal LinearLayouts
197         to form a button bar. -->
198        <attr name="buttonBarStyle" format="reference"/>
199        <!-- A style that may be applied to Buttons placed within a
200             LinearLayout with the style buttonBarStyle to form a button bar. -->
201        <attr name="buttonBarButtonStyle" format="reference"/>
202        <!-- A style that may be applied to buttons or other selectable items
203             that should react to pressed and focus states, but that do not
204             have a clear visual border along the edges. -->
205        <attr name="selectableItemBackground" format="reference"/>
206        <!-- Background drawable for borderless standalone items that need focus/pressed states. -->
207        <attr name="selectableItemBackgroundBorderless" format="reference" />
208        <!-- A drawable that may be used as a vertical divider between visual elements. -->
209        <attr name="dividerVertical" format="reference"/>
210        <!-- A drawable that may be used as a horizontal divider between visual elements. -->
211        <attr name="dividerHorizontal" format="reference"/>
212        <!-- Default ActivityChooserView style. -->
213        <attr name="activityChooserViewStyle" format="reference" />
214
215        <!-- Default Toolbar style. -->
216        <attr name="toolbarStyle" format="reference" />
217        <!-- Default Toolar NavigationButtonStyle -->
218        <attr name="toolbarNavigationButtonStyle" format="reference" />
219
220        <!-- Default PopupMenu style. -->
221        <attr name="popupMenuStyle" format="reference"/>
222        <!-- Default PopupWindow style. -->
223        <attr name="popupWindowStyle" format="reference" />
224
225        <!-- EditText text foreground color. -->
226        <attr name="editTextColor" format="reference|color" />
227        <!-- EditText background drawable. -->
228        <attr name="editTextBackground" format="reference" />
229
230        <!-- Default style for the Switch widget. -->
231        <attr name="switchStyle" format="reference" />
232
233        <!-- ============================ -->
234        <!-- SearchView styles and assets -->
235        <!-- ============================ -->
236        <eat-comment />
237        <!-- Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. -->
238        <attr name="textAppearanceSearchResultTitle" format="reference" />
239        <!-- Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. -->
240        <attr name="textAppearanceSearchResultSubtitle" format="reference" />
241        <!-- Text color for urls in search suggestions, used by things like global search -->
242        <attr name="textColorSearchUrl" format="reference|color" />
243        <!-- Style for the search query widget. -->
244        <attr name="searchViewStyle" format="reference" />
245
246        <!-- =========== -->
247        <!-- List styles -->
248        <!-- =========== -->
249        <eat-comment />
250
251        <!-- The preferred list item height. -->
252        <attr name="listPreferredItemHeight" format="dimension"/>
253        <!-- A smaller, sleeker list item height. -->
254        <attr name="listPreferredItemHeightSmall" format="dimension"/>
255        <!-- A larger, more robust list item height. -->
256        <attr name="listPreferredItemHeightLarge" format="dimension"/>
257
258        <!-- The preferred padding along the left edge of list items. -->
259        <attr name="listPreferredItemPaddingLeft" format="dimension"/>
260        <!-- The preferred padding along the right edge of list items. -->
261        <attr name="listPreferredItemPaddingRight" format="dimension"/>
262
263        <!-- ListPopupWindow compatibility -->
264        <attr name="dropDownListViewStyle" format="reference"/>
265        <attr name="listPopupWindowStyle" format="reference"/>
266
267        <!-- The preferred TextAppearance for the primary text of list items. -->
268        <attr name="textAppearanceListItem" format="reference"/>
269        <!-- The preferred TextAppearance for the primary text of small list items. -->
270        <attr name="textAppearanceListItemSmall" format="reference"/>
271
272
273        <!-- ============ -->
274        <!-- Panel styles -->
275        <!-- ============ -->
276        <eat-comment />
277
278        <!-- The background of a panel when it is inset from the left and right edges of the screen. -->
279        <attr name="panelBackground" format="reference" />
280        <!-- Default Panel Menu width. -->
281        <attr name="panelMenuListWidth" format="dimension" />
282        <!-- Default Panel Menu style. -->
283        <attr name="panelMenuListTheme" format="reference" />
284        <!-- Drawable used as a background for selected list items. -->
285        <attr name="listChoiceBackgroundIndicator" format="reference" />
286
287        <!-- ============= -->
288        <!-- Color palette -->
289        <!-- ============= -->
290        <eat-comment />
291
292        <!-- The primary branding color for the app. By default, this is the color applied to the
293             action bar background. -->
294        <attr name="colorPrimary" format="color" />
295
296        <!-- Dark variant of the primary branding color. By default, this is the color applied to
297             the status bar (via statusBarColor) and navigation bar (via navigationBarColor). -->
298        <attr name="colorPrimaryDark" format="color" />
299
300        <!-- Bright complement to the primary branding color. By default, this is the color applied
301             to framework controls (via colorControlActivated). -->
302        <attr name="colorAccent" format="color" />
303
304        <!-- The color applied to framework controls in their normal state. -->
305        <attr name="colorControlNormal" format="color" />
306
307        <!-- The color applied to framework controls in their activated (ex. checked) state. -->
308        <attr name="colorControlActivated" format="color" />
309
310        <!-- The color applied to framework control highlights (ex. ripples, list selectors). -->
311        <attr name="colorControlHighlight" format="color" />
312
313        <!-- The color applied to framework buttons in their normal state. -->
314        <attr name="colorButtonNormal" format="color" />
315
316        <!-- The color applied to framework switch thumbs in their normal state. -->
317        <attr name="colorSwitchThumbNormal" format="color" />
318
319    </declare-styleable>
320
321
322    <!-- ============================================ -->
323
324    <!-- Attributes used to style the Action Bar.
325         These should be set on your theme; the default actionBarStyle will
326         propagate them to the correct elements as needed.
327
328         Please Note: when overriding attributes for an ActionBar style
329         you must specify each attribute twice: once with the "android:"
330         namespace prefix and once without. -->
331    <declare-styleable name="ActionBar">
332        <!-- The type of navigation to use. -->
333        <attr name="navigationMode">
334            <!-- Normal static title text -->
335            <enum name="normal" value="0"/>
336            <!-- The action bar will use a selection list for navigation. -->
337            <enum name="listMode" value="1"/>
338            <!-- The action bar will use a series of horizontal tabs for navigation. -->
339            <enum name="tabMode" value="2"/>
340        </attr>
341        <!-- Options affecting how the action bar is displayed. -->
342        <attr name="displayOptions">
343            <flag name="none" value="0" />
344            <flag name="useLogo" value="0x1"/>
345            <flag name="showHome" value="0x2"/>
346            <flag name="homeAsUp" value="0x4"/>
347            <flag name="showTitle" value="0x8"/>
348            <flag name="showCustom" value="0x10"/>
349            <flag name="disableHome" value="0x20"/>
350        </attr>
351        <!-- Specifies title text used for navigationMode="normal" -->
352        <attr name="title"/>
353        <!-- Specifies subtitle text used for navigationMode="normal" -->
354        <attr name="subtitle" format="string"/>
355        <!-- Specifies a style to use for title text. -->
356        <attr name="titleTextStyle" format="reference"/>
357        <!-- Specifies a style to use for subtitle text. -->
358        <attr name="subtitleTextStyle" format="reference"/>
359        <!-- Specifies the drawable used for the application icon. -->
360        <attr name="icon" format="reference"/>
361        <!-- Specifies the drawable used for the application logo. -->
362        <attr name="logo" format="reference"/>
363        <!-- Specifies the drawable used for item dividers. -->
364        <attr name="divider" format="reference"/>
365        <!-- Specifies a background drawable for the action bar. -->
366        <attr name="background" format="reference"/>
367        <!-- Specifies a background drawable for a second stacked row of the action bar. -->
368        <attr name="backgroundStacked" format="reference|color"/>
369        <!-- Specifies a background drawable for the bottom component of a split action bar. -->
370        <attr name="backgroundSplit" format="reference|color"/>
371        <!-- Specifies a layout for custom navigation. Overrides navigationMode. -->
372        <attr name="customNavigationLayout" format="reference"/>
373        <!-- Specifies a fixed height. -->
374        <attr name="height"/>
375        <!-- Specifies a layout to use for the "home" section of the action bar. -->
376        <attr name="homeLayout" format="reference"/>
377        <!-- Specifies a style resource to use for an embedded progress bar. -->
378        <attr name="progressBarStyle" format="reference"/>
379        <!-- Specifies a style resource to use for an indeterminate progress spinner. -->
380        <attr name="indeterminateProgressStyle" format="reference"/>
381        <!-- Specifies the horizontal padding on either end for an embedded progress bar. -->
382        <attr name="progressBarPadding" format="dimension"/>
383        <!-- Up navigation glyph -->
384        <attr name="homeAsUpIndicator" />
385        <!-- Specifies padding that should be applied to the left and right sides of
386             system-provided items in the bar. -->
387        <attr name="itemPadding" format="dimension"/>
388        <!-- Set true to hide the action bar on a vertical nested scroll of content. -->
389        <attr name="hideOnContentScroll" format="boolean"/>
390        <!-- Minimum inset for content views within a bar. Navigation buttons and
391             menu views are excepted. Only valid for some themes and configurations. -->
392        <attr name="contentInsetStart" format="dimension"/>
393        <!-- Minimum inset for content views within a bar. Navigation buttons and
394             menu views are excepted. Only valid for some themes and configurations. -->
395        <attr name="contentInsetEnd" format="dimension"/>
396        <!-- Minimum inset for content views within a bar. Navigation buttons and
397             menu views are excepted. Only valid for some themes and configurations. -->
398        <attr name="contentInsetLeft" format="dimension"/>
399        <!-- Minimum inset for content views within a bar. Navigation buttons and
400             menu views are excepted. Only valid for some themes and configurations. -->
401        <attr name="contentInsetRight" format="dimension"/>
402        <!-- Elevation for the action bar itself -->
403        <attr name="elevation" format="dimension" />
404        <!-- Reference to a theme that should be used to inflate popups
405             shown by widgets in the action bar. -->
406        <attr name="popupTheme" format="reference" />
407    </declare-styleable>
408
409    <!-- Valid LayoutParams for views placed in the action bar as custom views. -->
410    <declare-styleable name="ActionBarLayout">
411        <attr name="android:layout_gravity"/>
412    </declare-styleable>
413
414    <declare-styleable name="ActionMenuItemView">
415        <attr name="android:minWidth"/>
416    </declare-styleable>
417
418    <declare-styleable name="ActionMode">
419        <!-- Specifies a style to use for title text. -->
420        <attr name="titleTextStyle"/>
421        <!-- Specifies a style to use for subtitle text. -->
422        <attr name="subtitleTextStyle"/>
423        <!-- Specifies a background for the action mode bar. -->
424        <attr name="background"/>
425        <!-- Specifies a background for the split action mode bar. -->
426        <attr name="backgroundSplit"/>
427        <!-- Specifies a fixed height for the action mode bar. -->
428        <attr name="height"/>
429        <!-- Specifies a layout to use for the "close" item at the starting edge. -->
430        <attr name="closeItemLayout" format="reference" />
431    </declare-styleable>
432
433    <declare-styleable name="View">
434        <!-- Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. -->
435        <attr name="paddingStart" format="dimension"/>
436        <!-- Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. -->
437        <attr name="paddingEnd" format="dimension"/>
438
439        <!-- Boolean that controls whether a view can take focus.  By default the user can not
440             move focus to a view; by setting this attribute to true the view is
441             allowed to take focus.  This value does not impact the behavior of
442             directly calling {@link android.view.View#requestFocus}, which will
443             always request focus regardless of this view.  It only impacts where
444             focus navigation will try to move focus. -->
445        <attr name="android:focusable" />
446
447        <!-- Deprecated. -->
448        <attr name="theme" format="reference" />
449
450        <!-- Specifies a theme override for a view. When a theme override is set, the
451             view will be inflated using a {@link android.content.Context} themed with
452             the specified resource. -->
453        <attr name="android:theme" />
454
455    </declare-styleable>
456
457    <declare-styleable name="MenuView">
458        <!-- Default appearance of menu item text. -->
459        <attr name="android:itemTextAppearance"/>
460        <!-- Default horizontal divider between rows of menu items. -->
461        <attr name="android:horizontalDivider"/>
462        <!-- Default vertical divider between menu items. -->
463        <attr name="android:verticalDivider"/>
464        <!-- Default background for the menu header. -->
465        <attr name="android:headerBackground"/>
466        <!-- Default background for each menu item. -->
467        <attr name="android:itemBackground"/>
468        <!-- Default animations for the menu. -->
469        <attr name="android:windowAnimationStyle"/>
470        <!-- Default disabled icon alpha for each menu item that shows an icon. -->
471        <attr name="android:itemIconDisabledAlpha"/>
472        <!-- Whether space should be reserved in layout when an icon is missing. -->
473        <attr name="preserveIconSpacing" format="boolean" />
474    </declare-styleable>
475    <declare-styleable name="ActionMenuView">
476        <!-- Size of padding on either end of a divider. -->
477    </declare-styleable>
478
479    <!-- Base attributes that are available to all groups. -->
480    <declare-styleable name="MenuGroup">
481
482        <!-- The ID of the group. -->
483        <attr name="android:id" />
484
485        <!-- The category applied to all items within this group.
486             (This will be or'ed with the orderInCategory attribute.) -->
487        <attr name="android:menuCategory" />
488
489        <!-- The order within the category applied to all items within this group.
490             (This will be or'ed with the category attribute.) -->
491        <attr name="android:orderInCategory" />
492
493        <!-- Whether the items are capable of displaying a check mark. -->
494        <attr name="android:checkableBehavior" />
495
496        <!-- Whether the items are shown/visible. -->
497        <attr name="android:visible" />
498
499        <!-- Whether the items are enabled. -->
500        <attr name="android:enabled" />
501
502    </declare-styleable>
503
504    <!-- Base attributes that are available to all Item objects. -->
505    <declare-styleable name="MenuItem">
506
507        <!-- The ID of the item. -->
508        <attr name="android:id" />
509
510        <!-- The category applied to the item.
511             (This will be or'ed with the orderInCategory attribute.) -->
512        <attr name="android:menuCategory" />
513
514        <!-- The order within the category applied to the item.
515             (This will be or'ed with the category attribute.) -->
516        <attr name="android:orderInCategory" />
517
518        <!-- The title associated with the item. -->
519        <attr name="android:title" />
520
521        <!-- The condensed title associated with the item.  This is used in situations where the
522             normal title may be too long to be displayed. -->
523        <attr name="android:titleCondensed" />
524
525        <!-- The icon associated with this item.  This icon will not always be shown, so
526             the title should be sufficient in describing this item. -->
527        <attr name="android:icon" />
528
529        <!-- The alphabetic shortcut key.  This is the shortcut when using a keyboard
530             with alphabetic keys. -->
531        <attr name="android:alphabeticShortcut" />
532
533        <!-- The numeric shortcut key.  This is the shortcut when using a numeric (e.g., 12-key)
534             keyboard. -->
535        <attr name="android:numericShortcut" />
536
537        <!-- Whether the item is capable of displaying a check mark. -->
538        <attr name="android:checkable" />
539
540        <!-- Whether the item is checked.  Note that you must first have enabled checking with
541             the checkable attribute or else the check mark will not appear. -->
542        <attr name="android:checked"  />
543
544        <!-- Whether the item is shown/visible. -->
545        <attr name="android:visible" />
546
547        <!-- Whether the item is enabled. -->
548        <attr name="android:enabled" />
549
550        <!-- Name of a method on the Context used to inflate the menu that will be
551             called when the item is clicked. -->
552        <attr name="android:onClick" />
553
554        <!-- How this item should display in the Action Bar, if present. -->
555        <attr name="showAsAction">
556            <!-- Never show this item in an action bar, show it in the overflow menu instead.
557                 Mutually exclusive with "ifRoom" and "always". -->
558            <flag name="never" value="0" />
559            <!-- Show this item in an action bar if there is room for it as determined
560                 by the system. Favor this option over "always" where possible.
561                 Mutually exclusive with "never" and "always". -->
562            <flag name="ifRoom" value="1" />
563            <!-- Always show this item in an actionbar, even if it would override
564                 the system's limits of how much stuff to put there. This may make
565                 your action bar look bad on some screens. In most cases you should
566                 use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". -->
567            <flag name="always" value="2" />
568            <!-- When this item is shown as an action in the action bar, show a text
569                 label with it even if it has an icon representation. -->
570            <flag name="withText" value="4" />
571            <!-- This item's action view collapses to a normal menu
572                 item. When expanded, the action view takes over a
573                 larger segment of its container. -->
574            <flag name="collapseActionView" value="8" />
575        </attr>
576
577        <!-- An optional layout to be used as an action view.
578             See {@link android.view.MenuItem#setActionView(android.view.View)}
579             for more info. -->
580        <attr name="actionLayout" format="reference" />
581
582        <!-- The name of an optional View class to instantiate and use as an
583             action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
584             for more info. -->
585        <attr name="actionViewClass" format="string" />
586
587        <!-- The name of an optional ActionProvider class to instantiate an action view
588             and perform operations such as default action for that menu item.
589             See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
590             for more info. -->
591        <attr name="actionProviderClass" format="string" />
592
593    </declare-styleable>
594
595    <declare-styleable name="Spinner">
596        <!-- The prompt to display when the spinner's dialog is shown. -->
597        <attr name="prompt" format="reference" />
598        <!-- Display mode for spinner options. -->
599        <attr name="spinnerMode" format="enum">
600            <!-- Spinner options will be presented to the user as a dialog window. -->
601            <enum name="dialog" value="0" />
602            <!-- Spinner options will be presented to the user as an inline dropdown
603                 anchored to the spinner widget itself. -->
604            <enum name="dropdown" value="1" />
605        </attr>
606        <!-- List selector to use for spinnerMode="dropdown" display. -->
607        <attr name="android:dropDownSelector" />
608        <!-- Background drawable to use for the dropdown in spinnerMode="dropdown". -->
609        <attr name="android:popupBackground" />
610        <!-- Vertical offset from the spinner widget for positioning the dropdown in
611             spinnerMode="dropdown". -->
612        <attr name="android:dropDownVerticalOffset" />
613        <!-- Horizontal offset from the spinner widget for positioning the dropdown
614             in spinnerMode="dropdown". -->
615        <attr name="android:dropDownHorizontalOffset" />
616        <!-- Width of the dropdown in spinnerMode="dropdown". -->
617        <attr name="android:dropDownWidth" />
618        <!-- Reference to a layout to use for displaying a prompt in the dropdown for
619             spinnerMode="dropdown". This layout must contain a TextView with the id
620             {@code @android:id/text1} to be populated with the prompt text. -->
621        <attr name="popupPromptView" format="reference" />
622        <!-- Gravity setting for positioning the currently selected item. -->
623        <attr name="android:gravity" />
624        <!-- Whether this spinner should mark child views as enabled/disabled when
625             the spinner itself is enabled/disabled. -->
626        <attr name="disableChildrenWhenDisabled" format="boolean" />
627        <attr name="android:background" />
628    </declare-styleable>
629
630    <declare-styleable name="SearchView">
631        <!-- The layout to use for the search view. -->
632        <attr name="layout" format="reference" />
633        <!-- The default state of the SearchView. If true, it will be iconified when not in
634             use and expanded when clicked. -->
635        <attr name="iconifiedByDefault" format="boolean" />
636        <!-- An optional maximum width of the SearchView. -->
637        <attr name="android:maxWidth" />
638        <!-- An optional query hint string to be displayed in the empty query field. -->
639        <attr name="queryHint" format="string" />
640        <!-- The IME options to set on the query text field. -->
641        <attr name="android:imeOptions" />
642        <!-- The input type to set on the query text field. -->
643        <attr name="android:inputType" />
644        <!-- Close button icon -->
645        <attr name="closeIcon" format="reference" />
646        <!-- Go button icon -->
647        <attr name="goIcon" format="reference" />
648        <!-- Search icon -->
649        <attr name="searchIcon" format="reference" />
650        <!-- Search icon displayed as a text field hint -->
651        <attr name="searchHintIcon" format="reference" />
652        <!-- Voice button icon -->
653        <attr name="voiceIcon" format="reference" />
654        <!-- Commit icon shown in the query suggestion row -->
655        <attr name="commitIcon" format="reference" />
656        <!-- Layout for query suggestion rows -->
657        <attr name="suggestionRowLayout" format="reference" />
658        <!-- Background for the section containing the search query -->
659        <attr name="queryBackground" format="reference" />
660        <!-- Background for the section containing the action (e.g. voice search) -->
661        <attr name="submitBackground" format="reference" />
662        <attr name="android:focusable" />
663    </declare-styleable>
664
665    <!-- Attrbitutes for a ActivityChooserView. -->
666    <declare-styleable name="ActivityChooserView">
667        <!-- The maximal number of items initially shown in the activity list. -->
668        <attr name="initialActivityCount" format="string" />
669        <!-- The drawable to show in the button for expanding the activities overflow popup.
670             <strong>Note:</strong> Clients would like to set this drawable
671             as a clue about the action the chosen activity will perform. For
672             example, if share activity is to be chosen the drawable should
673             give a clue that sharing is to be performed.
674         -->
675        <attr name="expandActivityOverflowButtonDrawable" format="reference" />
676    </declare-styleable>
677
678    <declare-styleable name="CompatTextView">
679        <!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
680        <attr name="textAllCaps" format="reference|boolean" />
681    </declare-styleable>
682
683    <declare-styleable name="LinearLayoutCompat">
684        <!-- Should the layout be a column or a row?  Use "horizontal"
685             for a row, "vertical" for a column.  The default is
686             horizontal. -->
687        <attr name="android:orientation" />
688        <attr name="android:gravity" />
689        <!-- When set to false, prevents the layout from aligning its children's
690             baselines. This attribute is particularly useful when the children
691             use different values for gravity. The default value is true. -->
692        <attr name="android:baselineAligned" />
693        <!-- When a linear layout is part of another layout that is baseline
694          aligned, it can specify which of its children to baseline align to
695          (that is, which child TextView).-->
696        <attr name="android:baselineAlignedChildIndex" />
697        <!-- Defines the maximum weight sum. If unspecified, the sum is computed
698             by adding the layout_weight of all of the children. This can be
699             used for instance to give a single child 50% of the total available
700             space by giving it a layout_weight of 0.5 and setting the weightSum
701             to 1.0. -->
702        <attr name="android:weightSum" />
703        <!-- When set to true, all children with a weight will be considered having
704             the minimum size of the largest child. If false, all children are
705             measured normally. -->
706        <attr name="measureWithLargestChild" format="boolean" />
707        <!-- Drawable to use as a vertical divider between buttons. -->
708        <attr name="divider" />
709        <!-- Setting for which dividers to show. -->
710        <attr name="showDividers">
711            <flag name="none" value="0" />
712            <flag name="beginning" value="1" />
713            <flag name="middle" value="2" />
714            <flag name="end" value="4" />
715        </attr>
716        <!-- Size of padding on either end of a divider. -->
717        <attr name="dividerPadding" format="dimension" />
718    </declare-styleable>
719
720    <declare-styleable name="LinearLayoutCompat_Layout">
721        <attr name="android:layout_width" />
722        <attr name="android:layout_height" />
723        <attr name="android:layout_weight" />
724        <attr name="android:layout_gravity" />
725    </declare-styleable>
726
727    <declare-styleable name="Toolbar">
728        <attr name="titleTextAppearance" format="reference" />
729        <attr name="subtitleTextAppearance" format="reference" />
730        <attr name="title" />
731        <attr name="subtitle" />
732        <attr name="android:gravity" />
733        <attr name="titleMargins" format="dimension" />
734        <attr name="titleMarginStart" format="dimension" />
735        <attr name="titleMarginEnd" format="dimension" />
736        <attr name="titleMarginTop" format="dimension" />
737        <attr name="titleMarginBottom" format="dimension" />
738        <attr name="contentInsetStart" />
739        <attr name="contentInsetEnd" />
740        <attr name="contentInsetLeft" />
741        <attr name="contentInsetRight" />
742        <attr name="maxButtonHeight" format="dimension" />
743
744        <attr name="collapseIcon" format="reference" />
745        <!-- Text to set as the content description for the collapse button. -->
746        <attr name="collapseContentDescription" format="string" />
747        <!-- Reference to a theme that should be used to inflate popups
748             shown by widgets in the toolbar. -->
749        <attr name="popupTheme" />
750        <!-- Icon drawable to use for the navigation button located at
751             the start of the toolbar. -->
752        <attr name="navigationIcon" format="reference" />
753        <!-- Text to set as the content description for the navigation button
754             located at the start of the toolbar. -->
755        <attr name="navigationContentDescription" format="string" />
756
757        <!-- Allows us to read in the minHeight attr pre-v16 -->
758        <attr name="android:minHeight" />
759    </declare-styleable>
760
761    <declare-styleable name="PopupWindowBackgroundState">
762        <!-- State identifier indicating the popup will be above the anchor. -->
763        <attr name="state_above_anchor" format="boolean" />
764    </declare-styleable>
765
766    <declare-styleable name="ListPopupWindow">
767        <!-- Amount of pixels by which the drop down should be offset vertically. -->
768        <attr name="android:dropDownVerticalOffset" />
769        <!-- Amount of pixels by which the drop down should be offset horizontally. -->
770        <attr name="android:dropDownHorizontalOffset" />
771    </declare-styleable>
772
773    <declare-styleable name="PopupWindow">
774        <!-- Whether the popup window should overlap its anchor view. -->
775        <attr name="overlapAnchor" format="boolean" />
776        <attr name="android:popupBackground" />
777    </declare-styleable>
778
779    <declare-styleable name="DrawerArrowToggle">
780        <!-- The drawing color for the bars -->
781        <attr name="color" format="color"/>
782        <!-- Whether bars should rotate or not during transition -->
783        <attr name="spinBars" format="boolean"/>
784        <!-- The total size of the drawable -->
785        <attr name="drawableSize" format="dimension"/>
786        <!-- The max gap between the bars when they are parallel to each other -->
787        <attr name="gapBetweenBars" format="dimension"/>
788        <!-- The size of the top and bottom bars when they merge to the middle bar to form an arrow -->
789        <attr name="topBottomBarArrowSize" format="dimension"/>
790        <!-- The size of the middle bar when top and bottom bars merge into middle bar to form an arrow -->
791        <attr name="middleBarArrowSize" format="dimension"/>
792        <!-- The size of the bars when they are parallel to each other -->
793        <attr name="barSize" format="dimension"/>
794        <!-- The thickness (stroke size) for the bar paint -->
795        <attr name="thickness" format="dimension"/>
796    </declare-styleable>
797
798    <attr name="drawerArrowStyle" format="reference" />
799
800    <declare-styleable name="ViewStubCompat">
801        <!-- Supply an identifier for the layout resource to inflate when the ViewStub
802             becomes visible or when forced to do so. The layout resource must be a
803             valid reference to a layout. -->
804        <attr name="android:layout" />
805        <!-- Overrides the id of the inflated View with this value. -->
806        <attr name="android:inflatedId" />
807        <attr name="android:id" />
808    </declare-styleable>
809
810    <declare-styleable name="SwitchCompat">
811        <!-- Drawable to use as the "thumb" that switches back and forth. -->
812        <attr name="android:thumb" />
813        <!-- Drawable to use as the "track" that the switch thumb slides within. -->
814        <attr name="track" format="reference" />
815        <!-- Text to use when the switch is in the checked/"on" state. -->
816        <attr name="android:textOn" />
817        <!-- Text to use when the switch is in the unchecked/"off" state. -->
818        <attr name="android:textOff" />
819        <!-- Amount of padding on either side of text within the switch thumb. -->
820        <attr name="thumbTextPadding" format="dimension" />
821        <!-- TextAppearance style for text displayed on the switch thumb. -->
822        <attr name="switchTextAppearance" format="reference" />
823        <!-- Minimum width for the switch component -->
824        <attr name="switchMinWidth" format="dimension" />
825        <!-- Minimum space between the switch and caption text -->
826        <attr name="switchPadding" format="dimension" />
827        <!-- Whether to split the track and leave a gap for the thumb drawable. -->
828        <attr name="splitTrack" format="boolean" />
829        <!-- Whether to draw on/off text. -->
830        <attr name="showText" format="boolean" />
831    </declare-styleable>
832
833    <declare-styleable name="SwitchCompatTextAppearance">
834        <attr name="android:textSize" />
835        <attr name="android:textColor" />
836        <attr name="android:textStyle" />
837        <attr name="android:typeface" />
838        <attr name="textAllCaps" />
839    </declare-styleable>
840
841</resources>
842