attrs.xml revision f055439eb1303027f37a50bd90ec50cb1f7740dd
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2015 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16-->
17<resources>
18
19    <declare-styleable name="FloatingActionButton">
20        <!-- Background for the FloatingActionButton -->
21        <attr name="backgroundTint"/>
22        <attr name="backgroundTintMode"/>
23
24        <!-- Ripple color for the FAB. -->
25        <attr name="rippleColor" format="color"/>
26        <!-- Size for the FAB. -->
27        <attr name="fabSize">
28            <!-- A size which will change based on the window size. -->
29            <enum name="auto" value="-1"/>
30            <!-- The normal sized button. -->
31            <enum name="normal" value="0"/>
32            <!-- The mini sized button. -->
33            <enum name="mini" value="1"/>
34        </attr>
35        <!-- Elevation value for the FAB -->
36        <attr name="elevation"/>
37        <!-- TranslationZ value for the FAB when pressed-->
38        <attr name="pressedTranslationZ" format="dimension"/>
39        <!-- The width of the border around the FAB. -->
40        <attr name="borderWidth" format="dimension"/>
41        <!-- Enable compat padding. -->
42        <attr name="useCompatPadding" format="boolean"/>
43    </declare-styleable>
44
45    <declare-styleable name="FloatingActionButton_Behavior_Layout">
46        <!-- Whether the FAB should automatically hide when there is no space for it. -->
47        <attr name="behavior_autoHide" format="boolean"/>
48    </declare-styleable>
49
50    <declare-styleable name="ScrimInsetsFrameLayout">
51        <attr name="insetForeground" format="color|reference"/>
52    </declare-styleable>
53
54    <declare-styleable name="NavigationView">
55        <attr name="android:background"/>
56        <attr name="android:fitsSystemWindows"/>
57        <attr name="android:maxWidth"/>
58        <attr name="elevation"/>
59        <!-- The menu resource to inflate and populate items from. -->
60        <attr name="menu" format="reference"/>
61        <attr name="itemIconTint" format="color"/>
62        <attr name="itemTextColor" format="color"/>
63        <attr name="itemBackground" format="reference"/>
64        <attr name="itemTextAppearance" format="reference"/>
65        <!-- Layout resource to inflate as the header -->
66        <attr name="headerLayout" format="reference"/>
67    </declare-styleable>
68
69    <declare-styleable name="ForegroundLinearLayout">
70        <attr name="android:foreground" />
71        <attr name="android:foregroundGravity" />
72        <attr name="foregroundInsidePadding" format="boolean" />
73    </declare-styleable>
74
75    <declare-styleable name="TabLayout">
76        <!-- Color of the indicator used to show the currently selected tab. -->
77        <attr name="tabIndicatorColor" format="color"/>
78        <!-- Height of the indicator used to show the currently selected tab. -->
79        <attr name="tabIndicatorHeight" format="dimension"/>
80        <!-- Position in the Y axis from the starting edge that tabs should be positioned from. -->
81        <attr name="tabContentStart" format="dimension"/>
82        <!-- Reference to a background to be applied to tabs. -->
83        <attr name="tabBackground" format="reference"/>
84        <!-- The behavior mode for the Tabs in this layout -->
85        <attr name="tabMode">
86            <enum name="scrollable" value="0"/>
87            <enum name="fixed" value="1"/>
88        </attr>
89        <!-- Gravity constant for tabs. -->
90        <attr name="tabGravity">
91            <enum name="fill" value="0"/>
92            <enum name="center" value="1"/>
93        </attr>
94        <!-- The minimum width for tabs. -->
95        <attr name="tabMinWidth" format="dimension"/>
96        <!-- The maximum width for tabs. -->
97        <attr name="tabMaxWidth" format="dimension"/>
98        <!-- A reference to a TextAppearance style to be applied to tabs. -->
99        <attr name="tabTextAppearance" format="reference"/>
100        <!-- The default text color to be applied to tabs. -->
101        <attr name="tabTextColor" format="color"/>
102        <!-- The text color to be applied to the currently selected tab. -->
103        <attr name="tabSelectedTextColor" format="color"/>
104        <!-- The preferred padding along the start edge of tabs. -->
105        <attr name="tabPaddingStart" format="dimension"/>
106        <!-- The preferred padding along the top edge of tabs. -->
107        <attr name="tabPaddingTop" format="dimension"/>
108        <!-- The preferred padding along the end edge of tabs. -->
109        <attr name="tabPaddingEnd" format="dimension"/>
110        <!-- The preferred padding along the bottom edge of tabs. -->
111        <attr name="tabPaddingBottom" format="dimension"/>
112        <!-- The preferred padding along all edges of tabs. -->
113        <attr name="tabPadding" format="dimension"/>
114    </declare-styleable>
115
116    <declare-styleable name="TabItem">
117        <!-- Text to display in the tab. -->
118        <attr name="android:text" />
119        <!-- Icon to display in the tab. -->
120        <attr name="android:icon" />
121        <!-- A reference to a layout resource to be displayed in the tab. -->
122        <attr name="android:layout" />
123    </declare-styleable>
124
125    <declare-styleable name="CoordinatorLayout">
126        <!-- A reference to an array of integers representing the
127             locations of horizontal keylines in dp from the starting edge.
128             Child views can refer to these keylines for alignment using
129             layout_keyline="index" where index is a 0-based index into
130             this array. -->
131        <attr name="keylines" format="reference"/>
132        <!-- Drawable to display behind the status bar when the view is set to draw behind it. -->
133        <attr name="statusBarBackground" format="reference"/>
134    </declare-styleable>
135
136    <declare-styleable name="CoordinatorLayout_Layout">
137        <attr name="android:layout_gravity"/>
138        <!-- The class name of a Behavior class defining special runtime behavior
139             for this child view. -->
140        <attr name="layout_behavior" format="string"/>
141        <!-- The id of an anchor view that this view should position relative to. -->
142        <attr name="layout_anchor" format="reference"/>
143        <!-- The index of a keyline this view should position relative to.
144             android:layout_gravity will affect how the view aligns to the
145             specified keyline. -->
146        <attr name="layout_keyline" format="integer"/>
147
148        <!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
149             within its parent's bounds.  -->
150        <attr name="layout_anchorGravity">
151            <!-- Push object to the top of its container, not changing its size. -->
152            <flag name="top" value="0x30"/>
153            <!-- Push object to the bottom of its container, not changing its size. -->
154            <flag name="bottom" value="0x50"/>
155            <!-- Push object to the left of its container, not changing its size. -->
156            <flag name="left" value="0x03"/>
157            <!-- Push object to the right of its container, not changing its size. -->
158            <flag name="right" value="0x05"/>
159            <!-- Place object in the vertical center of its container, not changing its size. -->
160            <flag name="center_vertical" value="0x10"/>
161            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
162            <flag name="fill_vertical" value="0x70"/>
163            <!-- Place object in the horizontal center of its container, not changing its size. -->
164            <flag name="center_horizontal" value="0x01"/>
165            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
166            <flag name="fill_horizontal" value="0x07"/>
167            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
168            <flag name="center" value="0x11"/>
169            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
170            <flag name="fill" value="0x77"/>
171            <!-- Additional option that can be set to have the top and/or bottom edges of
172                 the child clipped to its container's bounds.
173                 The clip will be based on the vertical gravity: a top gravity will clip the bottom
174                 edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
175            <flag name="clip_vertical" value="0x80"/>
176            <!-- Additional option that can be set to have the left and/or right edges of
177                 the child clipped to its container's bounds.
178                 The clip will be based on the horizontal gravity: a left gravity will clip the right
179                 edge, a right gravity will clip the left edge, and neither will clip both edges. -->
180            <flag name="clip_horizontal" value="0x08"/>
181            <!-- Push object to the beginning of its container, not changing its size. -->
182            <flag name="start" value="0x00800003"/>
183            <!-- Push object to the end of its container, not changing its size. -->
184            <flag name="end" value="0x00800005"/>
185        </attr>
186
187        <!-- Specifies how this view insets the CoordinatorLayout and make some other views
188             dodge it. -->
189        <attr name="layout_insetEdge" format="enum">
190            <!-- Don't inset. -->
191            <enum name="none" value="0x0"/>
192            <!-- Inset the top edge. -->
193            <enum name="top" value="0x30"/>
194            <!-- Inset the bottom edge. -->
195            <enum name="bottom" value="0x50"/>
196            <!-- Inset the left edge. -->
197            <enum name="left" value="0x03"/>
198            <!-- Inset the right edge. -->
199            <enum name="right" value="0x03"/>
200            <!-- Inset the start edge. -->
201            <enum name="start" value="0x00800003"/>
202            <!-- Inset the end edge. -->
203            <enum name="end" value="0x00800005"/>
204        </attr>
205        <!-- Specifies how this view dodges the inset edges of the CoordinatorLayout. -->
206        <attr name="layout_dodgeInsetEdges">
207            <!-- Don't dodge any edges -->
208            <flag name="none" value="0x0"/>
209            <!-- Dodge the top inset edge. -->
210            <flag name="top" value="0x30"/>
211            <!-- Dodge the bottom inset edge. -->
212            <flag name="bottom" value="0x50"/>
213            <!-- Dodge the left inset edge. -->
214            <flag name="left" value="0x03"/>
215            <!-- Dodge the right inset edge. -->
216            <flag name="right" value="0x03"/>
217            <!-- Dodge the start inset edge. -->
218            <flag name="start" value="0x00800003"/>
219            <!-- Dodge the end inset edge. -->
220            <flag name="end" value="0x00800005"/>
221            <!-- Dodge all the inset edges. -->
222            <flag name="all" value="0x77"/>
223        </attr>
224    </declare-styleable>
225
226    <declare-styleable name="TextInputLayout">
227        <attr name="hintTextAppearance" format="reference"/>
228        <!-- The hint to display in the floating label. -->
229        <attr name="android:hint"/>
230        <!-- Whether the layout's floating label functionality is enabled. -->
231        <attr name="hintEnabled" format="boolean"/>
232        <!-- Whether the layout is laid out as if an error will be displayed. -->
233        <attr name="errorEnabled" format="boolean"/>
234        <!-- TextAppearance of any error message displayed. -->
235        <attr name="errorTextAppearance" format="reference"/>
236        <!-- Whether the layout is laid out as if the character counter will be displayed. -->
237        <attr name="counterEnabled" format="boolean"/>
238        <!-- The max length to display in the character counter. -->
239        <attr name="counterMaxLength" format="integer" />
240        <!-- TextAppearance of the character counter. -->
241        <attr name="counterTextAppearance" format="reference"/>
242        <!-- TextAppearance of the character counter when the text is longer than the max. -->
243        <attr name="counterOverflowTextAppearance" format="reference"/>
244        <attr name="android:textColorHint"/>
245        <!-- Whether to animate hint state changes. -->
246        <attr name="hintAnimationEnabled" format="boolean"/>
247        <!-- Whether the view will display a toggle when the EditText has a password. -->
248        <attr name="passwordToggleEnabled" format="boolean"/>
249        <!-- Drawable to use as the password input visibility toggle icon. -->
250        <attr name="passwordToggleDrawable" format="reference"/>
251        <!-- Text to set as the content description for the password input visibility toggle. -->
252        <attr name="passwordToggleContentDescription" format="string"/>
253        <!-- Icon to use for the password input visibility toggle -->
254        <attr name="passwordToggleTint" format="color"/>
255        <!-- Blending mode used to apply the background tint. -->
256        <attr name="passwordToggleTintMode">
257            <!-- The tint is drawn on top of the drawable.
258                 [Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc] -->
259            <enum name="src_over" value="3" />
260            <!-- The tint is masked by the alpha channel of the drawable. The drawable’s
261                 color channels are thrown out. [Sa * Da, Sc * Da] -->
262            <enum name="src_in" value="5" />
263            <!-- The tint is drawn above the drawable, but with the drawable’s alpha
264                 channel masking the result. [Da, Sc * Da + (1 - Sa) * Dc] -->
265            <enum name="src_atop" value="9" />
266            <!-- Multiplies the color and alpha channels of the drawable with those of
267                 the tint. [Sa * Da, Sc * Dc] -->
268            <enum name="multiply" value="14" />
269            <!-- [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc] -->
270            <enum name="screen" value="15" />
271        </attr>
272    </declare-styleable>
273
274    <declare-styleable name="SnackbarLayout">
275        <attr name="android:maxWidth"/>
276        <attr name="elevation"/>
277        <attr name="maxActionInlineWidth" format="dimension"/>
278    </declare-styleable>
279
280    <declare-styleable name="AppBarLayout">
281        <!-- Deprecated. Elevation is now controlled via a state list animator. -->
282        <attr name="elevation" />
283        <attr name="android:background" />
284        <!-- The initial expanded state for the AppBarLayout. This only takes effect when this
285             view is a direct child of a CoordinatorLayout. -->
286        <attr name="expanded" format="boolean" />
287        <attr name="android:keyboardNavigationCluster" />
288        <attr name="android:touchscreenBlocksFocus" />
289    </declare-styleable>
290
291    <declare-styleable name="AppBarLayoutStates">
292        <!-- State value for {@link android.support.design.widget.AppBarLayout} set when the view
293             has been collapsed. -->
294        <attr name="state_collapsed" format="boolean" />
295        <!-- State value for {@link android.support.design.widget.AppBarLayout} set when the view
296             has children which are capable of being collapsed. -->
297        <attr name="state_collapsible" format="boolean" />
298    </declare-styleable>
299
300    <declare-styleable name="AppBarLayout_Layout">
301        <attr name="layout_scrollFlags">
302            <!-- The view will be scroll in direct relation to scroll events. This flag needs to be
303                 set for any of the other flags to take effect. If any sibling views
304                 before this one do not have this flag, then this value has no effect. -->
305            <flag name="scroll" value="0x1"/>
306
307            <!-- When exiting (scrolling off screen) the view will be scrolled until it is
308                 'collapsed'. The collapsed height is defined by the view's minimum height. -->
309            <flag name="exitUntilCollapsed" value="0x2"/>
310
311            <!-- When entering (scrolling on screen) the view will scroll on any downwards
312                 scroll event, regardless of whether the scrolling view is also scrolling. This
313                 is commonly referred to as the 'quick return' pattern. -->
314            <flag name="enterAlways" value="0x4"/>
315
316            <!-- An additional flag for 'enterAlways' which modifies the returning view to
317                 only initially scroll back to it's collapsed height. Once the scrolling view has
318                 reached the end of it's scroll range, the remainder of this view will be scrolled
319                 into view. -->
320            <flag name="enterAlwaysCollapsed" value="0x8"/>
321
322            <!-- Upon a scroll ending, if the view is only partially visible then it will be
323                 snapped and scrolled to it's closest edge. -->
324            <flag name="snap" value="0x10"/>
325        </attr>
326
327        <!-- An interpolator to use when scrolling this View. Only takes effect when View
328             is scrollable. -->
329        <attr name="layout_scrollInterpolator" format="reference" />
330    </declare-styleable>
331
332    <declare-styleable name="ScrollingViewBehavior_Layout">
333        <!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
334        <attr name="behavior_overlapTop" format="dimension" />
335    </declare-styleable>
336
337    <declare-styleable name="CollapsingToolbarLayout">
338        <!--  Specifies extra space on the start, top, end and bottom
339              sides of the the expanded title text. Margin values should be positive. -->
340        <attr name="expandedTitleMargin" format="dimension"/>
341        <!--  Specifies extra space on the start side of the the expanded title text.
342              Margin values should be positive. -->
343        <attr name="expandedTitleMarginStart" format="dimension"/>
344        <!--  Specifies extra space on the top side of the the expanded title text.
345              Margin values should be positive. -->
346        <attr name="expandedTitleMarginTop" format="dimension"/>
347        <!--  Specifies extra space on the end side of the the expanded title text.
348              Margin values should be positive. -->
349        <attr name="expandedTitleMarginEnd" format="dimension"/>
350        <!--  Specifies extra space on the bottom side of the the expanded title text.
351              Margin values should be positive. -->
352        <attr name="expandedTitleMarginBottom" format="dimension"/>
353        <!-- The text appearance of the CollapsingToolbarLayout's title when it is fully
354             'expanded' -->
355        <attr name="expandedTitleTextAppearance" format="reference"/>
356        <!-- The text appearance of the CollapsingToolbarLayouts title when it is fully
357             'collapsed' -->
358        <attr name="collapsedTitleTextAppearance" format="reference"/>
359        <!-- The drawable to use as a scrim on top of the CollapsingToolbarLayouts content when
360             it has been scrolled sufficiently off screen. -->
361        <attr name="contentScrim" format="color"/>
362        <!-- The drawable to use as a scrim for the status bar content when the
363             CollapsingToolbarLayout has been scrolled sufficiently off screen. Only works on
364             Lollipop with the correct setup. -->
365        <attr name="statusBarScrim" format="color" />
366        <!-- The id of the primary Toolbar child that you wish to use for the purpose of collapsing.
367             This Toolbar descendant view does not need to be a direct child of the layout.
368             If you do not set this, the first direct Toolbar child found will be used. -->
369        <attr name="toolbarId" format="reference"/>
370        <!-- Specifies the amount of visible height in pixels used to define when to trigger a
371             scrim visibility change. -->
372        <attr name="scrimVisibleHeightTrigger" format="dimension"/>
373        <!-- Specifies the duration used for scrim visibility animations. -->
374        <attr name="scrimAnimationDuration" format="integer"/>
375
376        <!-- Specifies how the title should be positioned when collapsed. -->
377        <attr name="collapsedTitleGravity">
378            <!-- Push title to the top of its container, not changing its size. -->
379            <flag name="top" value="0x30"/>
380            <!-- Push title to the bottom of its container, not changing its size. -->
381            <flag name="bottom" value="0x50"/>
382            <!-- Push title to the left of its container, not changing its size. -->
383            <flag name="left" value="0x03"/>
384            <!-- Push title to the right of its container, not changing its size. -->
385            <flag name="right" value="0x05"/>
386            <!-- Place title in the vertical center of its container, not changing its size. -->
387            <flag name="center_vertical" value="0x10"/>
388            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
389            <flag name="fill_vertical" value="0x70"/>
390            <!-- Place title in the horizontal center of its container, not changing its size. -->
391            <flag name="center_horizontal" value="0x01"/>
392            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
393            <flag name="center" value="0x11"/>
394            <!-- Push title to the beginning of its container, not changing its size. -->
395            <flag name="start" value="0x00800003"/>
396            <!-- Push title to the end of its container, not changing its size. -->
397            <flag name="end" value="0x00800005"/>
398        </attr>
399
400        <!-- Specifies how the title should be positioned when expanded. -->
401        <attr name="expandedTitleGravity">
402            <!-- Push title to the top of its container, not changing its size. -->
403            <flag name="top" value="0x30"/>
404            <!-- Push title to the bottom of its container, not changing its size. -->
405            <flag name="bottom" value="0x50"/>
406            <!-- Push title to the left of its container, not changing its size. -->
407            <flag name="left" value="0x03"/>
408            <!-- Push title to the right of its container, not changing its size. -->
409            <flag name="right" value="0x05"/>
410            <!-- Place title in the vertical center of its container, not changing its size. -->
411            <flag name="center_vertical" value="0x10"/>
412            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
413            <flag name="fill_vertical" value="0x70"/>
414            <!-- Place title in the horizontal center of its container, not changing its size. -->
415            <flag name="center_horizontal" value="0x01"/>
416            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
417            <flag name="center" value="0x11"/>
418            <!-- Push title to the beginning of its container, not changing its size. -->
419            <flag name="start" value="0x00800003"/>
420            <!-- Push title to the end of its container, not changing its size. -->
421            <flag name="end" value="0x00800005"/>
422        </attr>
423
424        <!-- Whether the CollapsingToolbarLayout should draw its own shrinking/growing title. -->
425        <attr name="titleEnabled" format="boolean"/>
426        <!-- The title to show when titleEnabled is set to true. -->
427        <attr name="title"/>
428    </declare-styleable>
429
430    <declare-styleable name="CollapsingToolbarLayout_Layout">
431        <attr name="layout_collapseMode">
432            <!-- The view will act as normal with no collapsing behavior. -->
433            <enum name="none" value="0"/>
434            <!-- The view will pin in place. -->
435            <enum name="pin" value="1"/>
436            <!-- The view will scroll in a parallax fashion. See the
437                 layout_collapseParallaxMultiplier attribute to change the multiplier. -->
438            <enum name="parallax" value="2"/>
439        </attr>
440
441        <!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
442             be between 0.0 and 1.0. -->
443        <attr name="layout_collapseParallaxMultiplier" format="float"/>
444    </declare-styleable>
445
446    <declare-styleable name="BottomSheetBehavior_Layout">
447        <!-- The height of the bottom sheet when it is collapsed. -->
448        <attr name="behavior_peekHeight" format="dimension">
449            <!-- Peek at the 16:9 ratio keyline of its parent -->
450            <enum name="auto" value="-1"/>
451        </attr>
452        <!-- Whether this bottom sheet can be hidden by dragging it further downwards -->
453        <attr name="behavior_hideable" format="boolean"/>
454        <!-- Skip the collapsed state once expanded; no effect unless it is hideable -->
455        <attr name="behavior_skipCollapsed" format="boolean"/>
456    </declare-styleable>
457
458    <declare-styleable name="DesignTheme">
459        <!-- Theme to use for modal bottom sheet dialogs spawned from this theme. -->
460        <attr name="bottomSheetDialogTheme" format="reference" />
461        <!-- Style to use for modal bottom sheets in this theme. -->
462        <attr name="bottomSheetStyle" format="reference" />
463
464        <!-- Text color used to indicate an error has occurred. -->
465        <!-- {@deprecated Use colorError} -->
466        <attr name="textColorError" format="reference|color" />
467    </declare-styleable>
468
469    <declare-styleable name="BottomNavigationView">
470        <!-- The menu resource to inflate and populate items from. -->
471        <attr name="menu"/>
472        <attr name="itemIconTint"/>
473        <attr name="itemTextColor"/>
474        <attr name="itemBackground"/>
475        <attr name="elevation"/>
476    </declare-styleable>
477
478</resources>
479