attrs.xml revision d2a4484c16a10860505536a6697d9aa310731242
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            <enum name="normal" value="0"/>
29            <enum name="mini" value="1"/>
30        </attr>
31        <!-- Elevation value for the FAB -->
32        <attr name="elevation"/>
33        <!-- TranslationZ value for the FAB when pressed-->
34        <attr name="pressedTranslationZ" format="dimension"/>
35        <!-- The width of the border around the FAB. -->
36        <attr name="borderWidth" format="dimension"/>
37        <!-- Enable compat padding. -->
38        <attr name="useCompatPadding" format="boolean"/>
39    </declare-styleable>
40
41    <declare-styleable name="ScrimInsetsFrameLayout">
42        <attr name="insetForeground" format="color|reference"/>
43    </declare-styleable>
44
45    <declare-styleable name="NavigationView">
46        <attr name="android:background"/>
47        <attr name="android:fitsSystemWindows"/>
48        <attr name="android:maxWidth"/>
49        <attr name="elevation"/>
50        <!-- The menu resource to inflate and populate items from. -->
51        <attr name="menu" format="reference"/>
52        <attr name="itemIconTint" format="color"/>
53        <attr name="itemTextColor" format="color"/>
54        <attr name="itemBackground" format="reference"/>
55        <attr name="itemTextAppearance" format="reference"/>
56        <!-- Layout resource to inflate as the header -->
57        <attr name="headerLayout" format="reference"/>
58    </declare-styleable>
59
60    <declare-styleable name="ForegroundLinearLayout">
61        <attr name="android:foreground" />
62        <attr name="android:foregroundGravity" />
63        <attr name="foregroundInsidePadding" format="boolean" />
64    </declare-styleable>
65
66    <declare-styleable name="TabLayout">
67        <attr name="tabIndicatorColor" format="color"/>
68        <attr name="tabIndicatorHeight" format="dimension"/>
69        <attr name="tabContentStart" format="dimension"/>
70
71        <attr name="tabBackground" format="reference"/>
72
73        <attr name="tabMode">
74            <enum name="scrollable" value="0"/>
75            <enum name="fixed" value="1"/>
76        </attr>
77
78        <!-- Standard gravity constant that a child supplies to its parent.
79             Defines how the child view should be positioned, on both the X and Y axes,
80             within its enclosing layout. -->
81        <attr name="tabGravity">
82            <enum name="fill" value="0"/>
83            <enum name="center" value="1"/>
84        </attr>
85
86        <attr name="tabMinWidth" format="dimension"/>
87        <attr name="tabMaxWidth" format="dimension"/>
88
89        <attr name="tabTextAppearance" format="reference"/>
90        <attr name="tabTextColor" format="color"/>
91        <attr name="tabSelectedTextColor" format="color"/>
92
93        <attr name="tabPaddingStart" format="dimension"/>
94        <attr name="tabPaddingTop" format="dimension"/>
95        <attr name="tabPaddingEnd" format="dimension"/>
96        <attr name="tabPaddingBottom" format="dimension"/>
97        <attr name="tabPadding" format="dimension"/>
98    </declare-styleable>
99
100    <declare-styleable name="CoordinatorLayout">
101        <!-- A reference to an array of integers representing the
102             locations of horizontal keylines in dp from the starting edge.
103             Child views can refer to these keylines for alignment using
104             layout_keyline="index" where index is a 0-based index into
105             this array. -->
106        <attr name="keylines" format="reference"/>
107        <!-- Drawable to display behind the status bar when the view is set to draw behind it. -->
108        <attr name="statusBarBackground" format="reference"/>
109    </declare-styleable>
110
111    <declare-styleable name="CoordinatorLayout_LayoutParams">
112        <attr name="android:layout_gravity"/>
113        <!-- The class name of a Behavior class defining special runtime behavior
114             for this child view. -->
115        <attr name="layout_behavior" format="string"/>
116        <!-- The id of an anchor view that this view should position relative to. -->
117        <attr name="layout_anchor" format="reference"/>
118        <!-- The index of a keyline this view should position relative to.
119             android:layout_gravity will affect how the view aligns to the
120             specified keyline. -->
121        <attr name="layout_keyline" format="integer"/>
122
123        <!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
124             within its parent's bounds.  -->
125        <attr name="layout_anchorGravity">
126            <!-- Push object to the top of its container, not changing its size. -->
127            <flag name="top" value="0x30"/>
128            <!-- Push object to the bottom of its container, not changing its size. -->
129            <flag name="bottom" value="0x50"/>
130            <!-- Push object to the left of its container, not changing its size. -->
131            <flag name="left" value="0x03"/>
132            <!-- Push object to the right of its container, not changing its size. -->
133            <flag name="right" value="0x05"/>
134            <!-- Place object in the vertical center of its container, not changing its size. -->
135            <flag name="center_vertical" value="0x10"/>
136            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
137            <flag name="fill_vertical" value="0x70"/>
138            <!-- Place object in the horizontal center of its container, not changing its size. -->
139            <flag name="center_horizontal" value="0x01"/>
140            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
141            <flag name="fill_horizontal" value="0x07"/>
142            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
143            <flag name="center" value="0x11"/>
144            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
145            <flag name="fill" value="0x77"/>
146            <!-- Additional option that can be set to have the top and/or bottom edges of
147                 the child clipped to its container's bounds.
148                 The clip will be based on the vertical gravity: a top gravity will clip the bottom
149                 edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
150            <flag name="clip_vertical" value="0x80"/>
151            <!-- Additional option that can be set to have the left and/or right edges of
152                 the child clipped to its container's bounds.
153                 The clip will be based on the horizontal gravity: a left gravity will clip the right
154                 edge, a right gravity will clip the left edge, and neither will clip both edges. -->
155            <flag name="clip_horizontal" value="0x08"/>
156            <!-- Push object to the beginning of its container, not changing its size. -->
157            <flag name="start" value="0x00800003"/>
158            <!-- Push object to the end of its container, not changing its size. -->
159            <flag name="end" value="0x00800005"/>
160        </attr>
161    </declare-styleable>
162
163    <declare-styleable name="TextInputLayout">
164        <attr name="hintTextAppearance" format="reference"/>
165        <!-- The hint to display in the floating label -->
166        <attr name="android:hint"/>
167        <!-- Whether the layout's floating label functionality is enabled -->
168        <attr name="hintEnabled" format="boolean"/>
169        <!-- Whether the layout is laid out as if an error will be displayed -->
170        <attr name="errorEnabled" format="boolean"/>
171        <!-- TextAppearance of any error message displayed -->
172        <attr name="errorTextAppearance" format="reference"/>
173        <!-- Whether the layout is laid out as if the character counter will be displayed -->
174        <attr name="counterEnabled" format="boolean"/>
175        <!-- The max length to display in the character counter -->
176        <attr name="counterMaxLength" format="integer" />
177        <!-- TextAppearance of the character counter -->
178        <attr name="counterTextAppearance" format="reference"/>
179        <!-- TextAppearance of the character counter when the text is longer than the max -->
180        <attr name="counterOverflowTextAppearance" format="reference"/>
181        <attr name="android:textColorHint"/>
182        <!-- Whether to animate hint state changes. -->
183        <attr name="hintAnimationEnabled" format="boolean"/>
184    </declare-styleable>
185
186    <declare-styleable name="SnackbarLayout">
187        <attr name="android:maxWidth"/>
188        <attr name="elevation"/>
189        <attr name="maxActionInlineWidth" format="dimension"/>
190    </declare-styleable>
191
192    <declare-styleable name="AppBarLayout">
193        <attr name="elevation" />
194        <attr name="android:background" />
195        <!-- The initial expanded state for the AppBarLayout. This only takes effect when this
196             view is a direct child of a CoordinatorLayout. -->
197        <attr name="expanded" format="boolean" />
198    </declare-styleable>
199
200    <declare-styleable name="AppBarLayout_LayoutParams">
201        <attr name="layout_scrollFlags">
202            <!-- The view will be scroll in direct relation to scroll events. This flag needs to be
203                 set for any of the other flags to take effect. If any sibling views
204                 before this one do not have this flag, then this value has no effect. -->
205            <flag name="scroll" value="0x1"/>
206
207            <!-- When exiting (scrolling off screen) the view will be scrolled until it is
208                 'collapsed'. The collapsed height is defined by the view's minimum height. -->
209            <flag name="exitUntilCollapsed" value="0x2"/>
210
211            <!-- When entering (scrolling on screen) the view will scroll on any downwards
212                 scroll event, regardless of whether the scrolling view is also scrolling. This
213                 is commonly referred to as the 'quick return' pattern. -->
214            <flag name="enterAlways" value="0x4"/>
215
216            <!-- An additional flag for 'enterAlways' which modifies the returning view to
217                 only initially scroll back to it's collapsed height. Once the scrolling view has
218                 reached the end of it's scroll range, the remainder of this view will be scrolled
219                 into view. -->
220            <flag name="enterAlwaysCollapsed" value="0x8"/>
221
222            <!-- Upon a scroll ending, if the view is only partially visible then it will be
223                 snapped and scrolled to it's closest edge. -->
224            <flag name="snap" value="0x10"/>
225        </attr>
226
227        <!-- An interpolator to use when scrolling this View. Only takes effect when View
228             is scrollable. -->
229        <attr name="layout_scrollInterpolator" format="reference" />
230    </declare-styleable>
231
232    <declare-styleable name="ScrollingViewBehavior_Params">
233        <!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
234        <attr name="behavior_overlapTop" format="dimension" />
235    </declare-styleable>
236
237    <declare-styleable name="CollapsingToolbarLayout">
238        <!--  Specifies extra space on the start, top, end and bottom
239              sides of the the expanded title text. Margin values should be positive. -->
240        <attr name="expandedTitleMargin" format="dimension"/>
241        <!--  Specifies extra space on the start side of the the expanded title text.
242              Margin values should be positive. -->
243        <attr name="expandedTitleMarginStart" format="dimension"/>
244        <!--  Specifies extra space on the top side of the the expanded title text.
245              Margin values should be positive. -->
246        <attr name="expandedTitleMarginTop" format="dimension"/>
247        <!--  Specifies extra space on the end side of the the expanded title text.
248              Margin values should be positive. -->
249        <attr name="expandedTitleMarginEnd" format="dimension"/>
250        <!--  Specifies extra space on the bottom side of the the expanded title text.
251              Margin values should be positive. -->
252        <attr name="expandedTitleMarginBottom" format="dimension"/>
253        <!-- The text appearance of the CollapsingToolbarLayout's title when it is fully
254             'expanded' -->
255        <attr name="expandedTitleTextAppearance" format="reference"/>
256        <!-- The text appearance of the CollapsingToolbarLayouts title when it is fully
257             'collapsed' -->
258        <attr name="collapsedTitleTextAppearance" format="reference"/>
259        <!-- The drawable to use as a scrim on top of the CollapsingToolbarLayouts content when
260             it has been scrolled sufficiently off screen. -->
261        <attr name="contentScrim" format="color"/>
262        <!-- The drawable to use as a scrim for the status bar content when the
263             CollapsingToolbarLayout has been scrolled sufficiently off screen. Only works on
264             Lollipop with the correct setup. -->
265        <attr name="statusBarScrim" format="color" />
266        <!-- The id of the primary Toolbar child that you wish to use for the purpose of collapsing.
267             This Toolbar descendant view does not need to be a direct child of the layout.
268             If you do not set this, the first direct Toolbar child found will be used. -->
269        <attr name="toolbarId" format="reference"/>
270
271        <!-- Specifies how the title should be positioned when collapsed. -->
272        <attr name="collapsedTitleGravity">
273            <!-- Push title to the top of its container, not changing its size. -->
274            <flag name="top" value="0x30"/>
275            <!-- Push title to the bottom of its container, not changing its size. -->
276            <flag name="bottom" value="0x50"/>
277            <!-- Push title to the left of its container, not changing its size. -->
278            <flag name="left" value="0x03"/>
279            <!-- Push title to the right of its container, not changing its size. -->
280            <flag name="right" value="0x05"/>
281            <!-- Place title in the vertical center of its container, not changing its size. -->
282            <flag name="center_vertical" value="0x10"/>
283            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
284            <flag name="fill_vertical" value="0x70"/>
285            <!-- Place title in the horizontal center of its container, not changing its size. -->
286            <flag name="center_horizontal" value="0x01"/>
287            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
288            <flag name="center" value="0x11"/>
289            <!-- Push title to the beginning of its container, not changing its size. -->
290            <flag name="start" value="0x00800003"/>
291            <!-- Push title to the end of its container, not changing its size. -->
292            <flag name="end" value="0x00800005"/>
293        </attr>
294
295        <!-- Specifies how the title should be positioned when expanded. -->
296        <attr name="expandedTitleGravity">
297            <!-- Push title to the top of its container, not changing its size. -->
298            <flag name="top" value="0x30"/>
299            <!-- Push title to the bottom of its container, not changing its size. -->
300            <flag name="bottom" value="0x50"/>
301            <!-- Push title to the left of its container, not changing its size. -->
302            <flag name="left" value="0x03"/>
303            <!-- Push title to the right of its container, not changing its size. -->
304            <flag name="right" value="0x05"/>
305            <!-- Place title in the vertical center of its container, not changing its size. -->
306            <flag name="center_vertical" value="0x10"/>
307            <!-- Grow the vertical size of the title if needed so it completely fills its container. -->
308            <flag name="fill_vertical" value="0x70"/>
309            <!-- Place title in the horizontal center of its container, not changing its size. -->
310            <flag name="center_horizontal" value="0x01"/>
311            <!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
312            <flag name="center" value="0x11"/>
313            <!-- Push title to the beginning of its container, not changing its size. -->
314            <flag name="start" value="0x00800003"/>
315            <!-- Push title to the end of its container, not changing its size. -->
316            <flag name="end" value="0x00800005"/>
317        </attr>
318
319        <!-- Whether the CollapsingToolbarLayout should draw its own shrinking/growing title. -->
320        <attr name="titleEnabled" format="boolean"/>
321        <!-- The title to show when titleEnabled is set to true. -->
322        <attr name="title"/>
323    </declare-styleable>
324
325    <declare-styleable name="CollapsingAppBarLayout_LayoutParams">
326        <attr name="layout_collapseMode">
327            <!-- The view will act as normal with no collapsing behavior. -->
328            <enum name="none" value="0"/>
329            <!-- The view will pin in place. -->
330            <enum name="pin" value="1"/>
331            <!-- The view will scroll in a parallax fashion. See the
332                 layout_collapseParallaxMultiplier attribute to change the multiplier. -->
333            <enum name="parallax" value="2"/>
334        </attr>
335
336        <!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
337             be between 0.0 and 1.0. -->
338        <attr name="layout_collapseParallaxMultiplier" format="float"/>
339    </declare-styleable>
340
341    <declare-styleable name="BottomSheetBehavior_Params">
342        <!-- The height of the bottom sheet when it is collapsed. -->
343        <attr name="behavior_peekHeight" format="dimension"/>
344        <attr name="behavior_hideable" format="boolean"/>
345    </declare-styleable>
346
347    <declare-styleable name="DesignTheme">
348        <!-- Theme to use for modal bottom sheet dialogs spawned from this theme. -->
349        <attr name="bottomSheetDialogTheme" format="reference" />
350        <!-- Style to use for modal bottom sheets in this theme. -->
351        <attr name="bottomSheetStyle" format="reference" />
352    </declare-styleable>
353
354</resources>
355
356