attrs.xml revision 23e274886774bf1a6c433ed98503e148fa1e15b4
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    </declare-styleable>
187
188    <declare-styleable name="TextInputLayout">
189        <attr name="hintTextAppearance" format="reference"/>
190        <!-- The hint to display in the floating label -->
191        <attr name="android:hint"/>
192        <!-- Whether the layout's floating label functionality is enabled -->
193        <attr name="hintEnabled" format="boolean"/>
194        <!-- Whether the layout is laid out as if an error will be displayed -->
195        <attr name="errorEnabled" format="boolean"/>
196        <!-- TextAppearance of any error message displayed -->
197        <attr name="errorTextAppearance" format="reference"/>
198        <!-- Whether the layout is laid out as if the character counter will be displayed -->
199        <attr name="counterEnabled" format="boolean"/>
200        <!-- The max length to display in the character counter -->
201        <attr name="counterMaxLength" format="integer" />
202        <!-- TextAppearance of the character counter -->
203        <attr name="counterTextAppearance" format="reference"/>
204        <!-- TextAppearance of the character counter when the text is longer than the max -->
205        <attr name="counterOverflowTextAppearance" format="reference"/>
206        <attr name="android:textColorHint"/>
207        <!-- Whether to animate hint state changes. -->
208        <attr name="hintAnimationEnabled" format="boolean"/>
209    </declare-styleable>
210
211    <declare-styleable name="SnackbarLayout">
212        <attr name="android:maxWidth"/>
213        <attr name="elevation"/>
214        <attr name="maxActionInlineWidth" format="dimension"/>
215    </declare-styleable>
216
217    <declare-styleable name="AppBarLayout">
218        <!-- Deprecated. Elevation is now controlled via a state list animator. -->
219        <attr name="elevation" />
220        <attr name="android:background" />
221        <!-- The initial expanded state for the AppBarLayout. This only takes effect when this
222             view is a direct child of a CoordinatorLayout. -->
223        <attr name="expanded" format="boolean" />
224    </declare-styleable>
225
226    <declare-styleable name="AppBarLayoutStates">
227        <!-- State value for {@link android.support.design.widget.AppBarLayout} set when the view
228             has been collapsed. -->
229        <attr name="state_collapsed" format="boolean" />
230        <!-- State value for {@link android.support.design.widget.AppBarLayout} set when the view
231             has children which are capable of being collapsed. -->
232        <attr name="state_collapsible" format="boolean" />
233    </declare-styleable>
234
235    <declare-styleable name="AppBarLayout_Layout">
236        <attr name="layout_scrollFlags">
237            <!-- The view will be scroll in direct relation to scroll events. This flag needs to be
238                 set for any of the other flags to take effect. If any sibling views
239                 before this one do not have this flag, then this value has no effect. -->
240            <flag name="scroll" value="0x1"/>
241
242            <!-- When exiting (scrolling off screen) the view will be scrolled until it is
243                 'collapsed'. The collapsed height is defined by the view's minimum height. -->
244            <flag name="exitUntilCollapsed" value="0x2"/>
245
246            <!-- When entering (scrolling on screen) the view will scroll on any downwards
247                 scroll event, regardless of whether the scrolling view is also scrolling. This
248                 is commonly referred to as the 'quick return' pattern. -->
249            <flag name="enterAlways" value="0x4"/>
250
251            <!-- An additional flag for 'enterAlways' which modifies the returning view to
252                 only initially scroll back to it's collapsed height. Once the scrolling view has
253                 reached the end of it's scroll range, the remainder of this view will be scrolled
254                 into view. -->
255            <flag name="enterAlwaysCollapsed" value="0x8"/>
256
257            <!-- Upon a scroll ending, if the view is only partially visible then it will be
258                 snapped and scrolled to it's closest edge. -->
259            <flag name="snap" value="0x10"/>
260        </attr>
261
262        <!-- An interpolator to use when scrolling this View. Only takes effect when View
263             is scrollable. -->
264        <attr name="layout_scrollInterpolator" format="reference" />
265    </declare-styleable>
266
267    <declare-styleable name="ScrollingViewBehavior_Layout">
268        <!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
269        <attr name="behavior_overlapTop" format="dimension" />
270    </declare-styleable>
271
272    <declare-styleable name="CollapsingToolbarLayout">
273        <!--  Specifies extra space on the start, top, end and bottom
274              sides of the the expanded title text. Margin values should be positive. -->
275        <attr name="expandedTitleMargin" format="dimension"/>
276        <!--  Specifies extra space on the start side of the the expanded title text.
277              Margin values should be positive. -->
278        <attr name="expandedTitleMarginStart" format="dimension"/>
279        <!--  Specifies extra space on the top side of the the expanded title text.
280              Margin values should be positive. -->
281        <attr name="expandedTitleMarginTop" format="dimension"/>
282        <!--  Specifies extra space on the end side of the the expanded title text.
283              Margin values should be positive. -->
284        <attr name="expandedTitleMarginEnd" format="dimension"/>
285        <!--  Specifies extra space on the bottom side of the the expanded title text.
286              Margin values should be positive. -->
287        <attr name="expandedTitleMarginBottom" format="dimension"/>
288        <!-- The text appearance of the CollapsingToolbarLayout's title when it is fully
289             'expanded' -->
290        <attr name="expandedTitleTextAppearance" format="reference"/>
291        <!-- The text appearance of the CollapsingToolbarLayouts title when it is fully
292             'collapsed' -->
293        <attr name="collapsedTitleTextAppearance" format="reference"/>
294        <!-- The drawable to use as a scrim on top of the CollapsingToolbarLayouts content when
295             it has been scrolled sufficiently off screen. -->
296        <attr name="contentScrim" format="color"/>
297        <!-- The drawable to use as a scrim for the status bar content when the
298             CollapsingToolbarLayout has been scrolled sufficiently off screen. Only works on
299             Lollipop with the correct setup. -->
300        <attr name="statusBarScrim" format="color" />
301        <!-- The id of the primary Toolbar child that you wish to use for the purpose of collapsing.
302             This Toolbar descendant view does not need to be a direct child of the layout.
303             If you do not set this, the first direct Toolbar child found will be used. -->
304        <attr name="toolbarId" format="reference"/>
305        <!-- Specifies the amount of visible height in pixels used to define when to trigger a
306             scrim visibility change. -->
307        <attr name="scrimVisibleHeightTrigger" format="dimension"/>
308        <!-- Specifies the duration used for scrim visibility animations. -->
309        <attr name="scrimAnimationDuration" format="integer"/>
310
311        <!-- Specifies how the title should be positioned when collapsed. -->
312        <attr name="collapsedTitleGravity">
313            <!-- Push title to the top of its container, not changing its size. -->
314            <flag name="top" value="0x30"/>
315            <!-- Push title to the bottom of its container, not changing its size. -->
316            <flag name="bottom" value="0x50"/>
317            <!-- Push title to the left of its container, not changing its size. -->
318            <flag name="left" value="0x03"/>
319            <!-- Push title to the right of its container, not changing its size. -->
320            <flag name="right" value="0x05"/>
321            <!-- Place title in the vertical center of its container, not changing its size. -->
322            <flag name="center_vertical" value="0x10"/>
323            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
324            <flag name="fill_vertical" value="0x70"/>
325            <!-- Place title in the horizontal center of its container, not changing its size. -->
326            <flag name="center_horizontal" value="0x01"/>
327            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
328            <flag name="center" value="0x11"/>
329            <!-- Push title to the beginning of its container, not changing its size. -->
330            <flag name="start" value="0x00800003"/>
331            <!-- Push title to the end of its container, not changing its size. -->
332            <flag name="end" value="0x00800005"/>
333        </attr>
334
335        <!-- Specifies how the title should be positioned when expanded. -->
336        <attr name="expandedTitleGravity">
337            <!-- Push title to the top of its container, not changing its size. -->
338            <flag name="top" value="0x30"/>
339            <!-- Push title to the bottom of its container, not changing its size. -->
340            <flag name="bottom" value="0x50"/>
341            <!-- Push title to the left of its container, not changing its size. -->
342            <flag name="left" value="0x03"/>
343            <!-- Push title to the right of its container, not changing its size. -->
344            <flag name="right" value="0x05"/>
345            <!-- Place title in the vertical center of its container, not changing its size. -->
346            <flag name="center_vertical" value="0x10"/>
347            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
348            <flag name="fill_vertical" value="0x70"/>
349            <!-- Place title in the horizontal center of its container, not changing its size. -->
350            <flag name="center_horizontal" value="0x01"/>
351            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
352            <flag name="center" value="0x11"/>
353            <!-- Push title to the beginning of its container, not changing its size. -->
354            <flag name="start" value="0x00800003"/>
355            <!-- Push title to the end of its container, not changing its size. -->
356            <flag name="end" value="0x00800005"/>
357        </attr>
358
359        <!-- Whether the CollapsingToolbarLayout should draw its own shrinking/growing title. -->
360        <attr name="titleEnabled" format="boolean"/>
361        <!-- The title to show when titleEnabled is set to true. -->
362        <attr name="title"/>
363    </declare-styleable>
364
365    <declare-styleable name="CollapsingToolbarLayout_Layout">
366        <attr name="layout_collapseMode">
367            <!-- The view will act as normal with no collapsing behavior. -->
368            <enum name="none" value="0"/>
369            <!-- The view will pin in place. -->
370            <enum name="pin" value="1"/>
371            <!-- The view will scroll in a parallax fashion. See the
372                 layout_collapseParallaxMultiplier attribute to change the multiplier. -->
373            <enum name="parallax" value="2"/>
374        </attr>
375
376        <!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
377             be between 0.0 and 1.0. -->
378        <attr name="layout_collapseParallaxMultiplier" format="float"/>
379    </declare-styleable>
380
381    <declare-styleable name="BottomSheetBehavior_Layout">
382        <!-- The height of the bottom sheet when it is collapsed. -->
383        <attr name="behavior_peekHeight" format="dimension"/>
384        <!-- Whether this bottom sheet can be hidden by dragging it further downwards -->
385        <attr name="behavior_hideable" format="boolean"/>
386        <!-- Skip the collapsed state once expanded; no effect unless it is hideable -->
387        <attr name="behavior_skipCollapsed" format="boolean"/>
388    </declare-styleable>
389
390    <declare-styleable name="DesignTheme">
391        <!-- Theme to use for modal bottom sheet dialogs spawned from this theme. -->
392        <attr name="bottomSheetDialogTheme" format="reference" />
393        <!-- Style to use for modal bottom sheets in this theme. -->
394        <attr name="bottomSheetStyle" format="reference" />
395
396        <!-- Text color used to indicate an error has occurred. -->
397        <attr name="textColorError" format="color" />
398    </declare-styleable>
399
400    <declare-styleable name="BottomNavigationView">
401        <!-- The menu resource to inflate and populate items from. -->
402        <attr name="menu"/>
403        <attr name="itemIconTint"/>
404        <attr name="itemTextColor"/>
405        <attr name="itemBackground"/>
406    </declare-styleable>
407
408</resources>
409