attrs.xml revision 0cf8ecaeccbd07b5259927569eaf79e9a275d34f
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="android:background"/>
22        <attr name="backgroundTint"/>
23        <attr name="backgroundTintMode"/>
24
25        <!-- Ripple color for the FAB. -->
26        <attr name="rippleColor" format="color|reference"/>
27        <!-- Size for the FAB. -->
28        <attr name="fabSize">
29            <enum name="normal" value="0"/>
30            <enum name="mini" value="1"/>
31        </attr>
32        <!-- Elevation value for the FAB -->
33        <attr name="elevation"/>
34        <!-- TranslationZ value for the FAB when pressed-->
35        <attr name="pressedTranslationZ" format="dimension|reference"/>
36    </declare-styleable>
37
38    <declare-styleable name="ScrimInsetsFrameLayout">
39        <attr name="insetForeground" format="color|reference"/>
40    </declare-styleable>
41
42    <declare-styleable name="NavigationView">
43        <attr name="android:background"/>
44        <attr name="android:fitsSystemWindows"/>
45        <attr name="android:maxWidth"/>
46        <attr name="elevation"/>
47        <!-- The menu resource to inflate and populate items from. -->
48        <attr name="menu" format="reference"/>
49        <attr name="itemTint" format="color|reference"/>
50        <attr name="itemBackground" format="reference"/>
51        <!-- Layout resource to inflate as the header -->
52        <attr name="headerLayout" format="reference"/>
53    </declare-styleable>
54
55    <declare-styleable name="TabLayout">
56        <attr name="tabIndicatorColor" format="color"/>
57        <attr name="tabIndicatorHeight" format="dimension"/>
58        <attr name="tabContentStart" format="dimension"/>
59
60        <attr name="tabBackground" format="reference"/>
61
62        <attr name="tabMode">
63            <enum name="scrollable" value="0"/>
64            <enum name="fixed" value="1"/>
65        </attr>
66
67        <!-- Standard gravity constant that a child supplies to its parent.
68             Defines how the child view should be positioned, on both the X and Y axes,
69             within its enclosing layout. -->
70        <attr name="tabGravity">
71            <enum name="fill" value="0"/>
72            <enum name="center" value="1"/>
73        </attr>
74
75        <attr name="tabMinWidth" format="dimension"/>
76        <attr name="tabMaxWidth" format="dimension"/>
77
78        <attr name="tabTextAppearance" format="reference"/>
79        <attr name="tabSelectedTextColor" format="color"/>
80
81        <attr name="tabPaddingStart" format="dimension"/>
82        <attr name="tabPaddingTop" format="dimension"/>
83        <attr name="tabPaddingEnd" format="dimension"/>
84        <attr name="tabPaddingBottom" format="dimension"/>
85        <attr name="tabPadding" format="dimension"/>
86    </declare-styleable>
87
88    <declare-styleable name="CoordinatorLayout">
89        <!-- A reference to an array of integers representing the
90             locations of horizontal keylines in dp from the starting edge.
91             Child views can refer to these keylines for alignment using
92             layout_keyline="index" where index is a 0-based index into
93             this array. -->
94        <attr name="keylines" format="reference"/>
95    </declare-styleable>
96
97    <declare-styleable name="CoordinatorLayout_LayoutParams">
98        <attr name="android:layout_gravity"/>
99        <!-- The class name of a Behavior class defining special runtime behavior
100             for this child view. -->
101        <attr name="layout_behavior" format="string"/>
102        <!-- The id of an anchor view that this view should position relative to. -->
103        <attr name="layout_anchor" format="reference"/>
104        <!-- The index of a keyline this view should position relative to.
105             android:layout_gravity will affect how the view aligns to the
106             specified keyline. -->
107        <attr name="layout_keyline" format="integer"/>
108
109        <!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
110             within its parent's bounds.  -->
111        <attr name="layout_anchorGravity">
112            <!-- Push object to the top of its container, not changing its size. -->
113            <flag name="top" value="0x30"/>
114            <!-- Push object to the bottom of its container, not changing its size. -->
115            <flag name="bottom" value="0x50"/>
116            <!-- Push object to the left of its container, not changing its size. -->
117            <flag name="left" value="0x03"/>
118            <!-- Push object to the right of its container, not changing its size. -->
119            <flag name="right" value="0x05"/>
120            <!-- Place object in the vertical center of its container, not changing its size. -->
121            <flag name="center_vertical" value="0x10"/>
122            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
123            <flag name="fill_vertical" value="0x70"/>
124            <!-- Place object in the horizontal center of its container, not changing its size. -->
125            <flag name="center_horizontal" value="0x01"/>
126            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
127            <flag name="fill_horizontal" value="0x07"/>
128            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
129            <flag name="center" value="0x11"/>
130            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
131            <flag name="fill" value="0x77"/>
132            <!-- Additional option that can be set to have the top and/or bottom edges of
133                 the child clipped to its container's bounds.
134                 The clip will be based on the vertical gravity: a top gravity will clip the bottom
135                 edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
136            <flag name="clip_vertical" value="0x80"/>
137            <!-- Additional option that can be set to have the left and/or right edges of
138                 the child clipped to its container's bounds.
139                 The clip will be based on the horizontal gravity: a left gravity will clip the right
140                 edge, a right gravity will clip the left edge, and neither will clip both edges. -->
141            <flag name="clip_horizontal" value="0x08"/>
142            <!-- Push object to the beginning of its container, not changing its size. -->
143            <flag name="start" value="0x00800003"/>
144            <!-- Push object to the end of its container, not changing its size. -->
145            <flag name="end" value="0x00800005"/>
146        </attr>
147    </declare-styleable>
148
149    <declare-styleable name="TextInputLayout">
150        <attr name="hintTextAppearance" format="reference"/>
151        <!-- The hint to display in the floating label -->
152        <attr name="android:hint"/>
153        <!-- Whether the layout is laid out as if an error will be displayed -->
154        <attr name="errorEnabled" format="boolean"/>
155        <!-- TextAppearance of any error message displayed -->
156        <attr name="errorTextAppearance" format="reference"/>
157    </declare-styleable>
158
159    <declare-styleable name="SnackbarLayout">
160        <attr name="android:maxWidth"/>
161        <attr name="elevation"/>
162        <attr name="maxActionInlineWidth" format="dimension"/>
163    </declare-styleable>
164
165    <declare-styleable name="AppBarLayout">
166        <attr name="elevation" />
167        <attr name="android:background" />
168    </declare-styleable>
169
170    <declare-styleable name="AppBarLayout_LayoutParams">
171        <attr name="layout_scrollFlags">
172            <!-- The view will be scroll in direct relation to scroll events. This flag needs to be
173                 set for any of the other flags to take effect. If any sibling views
174                 before this one do not have this flag, then this value has no effect. -->
175            <flag name="scroll" value="0x1"/>
176
177            <!-- When exiting (scrolling off screen) the view will be scrolled until it is
178                 'collapsed'. The collapsed height is defined by the view's minimum height. -->
179            <flag name="exitUntilCollapsed" value="0x2"/>
180
181            <!-- When entering (scrolling on screen) the view will scroll on any downwards
182                 scroll event, regardless of whether the scrolling view is also scrolling. This
183                 is commonly referred to as the 'quick return' pattern. -->
184            <flag name="enterAlways" value="0x4"/>
185
186            <!-- An additional flag for 'enterAlways' which modifies the returning view to
187                 only initially scroll back to it's collapsed height. Once the scrolling view has
188                 reached the end of it's scroll range, the remainder of this view will be scrolled
189                 into view. -->
190            <flag name="enterAlwaysCollapsed" value="0x8"/>
191        </attr>
192
193        <!-- An interpolator to use when scrolling this View. Only takes effect when View
194             is scrollable. -->
195        <attr name="layout_scrollInterpolator" format="reference" />
196    </declare-styleable>
197
198    <declare-styleable name="ScrollingViewBehavior_Params">
199        <!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
200        <attr name="behavior_overlapTop" format="dimension" />
201    </declare-styleable>
202
203    <declare-styleable name="CollapsingToolbarLayout">
204        <attr name="expandedTitleMargin" format="dimension"/>
205        <attr name="expandedTitleMarginStart" format="dimension"/>
206        <attr name="expandedTitleMarginBottom" format="dimension"/>
207        <attr name="expandedTitleMarginEnd" format="dimension"/>
208        <attr name="expandedTitleTextAppearance" format="reference"/>
209        <attr name="collapsedTitleTextAppearance" format="reference"/>
210        <attr name="foregroundScrimColor" format="color"/>
211    </declare-styleable>
212
213    <declare-styleable name="CollapsingAppBarLayout_LayoutParams">
214        <attr name="layout_collapseMode">
215            <!-- The view will act as normal with no collapsing behavior. -->
216            <enum name="none" value="0"/>
217            <!-- The view will pin in place. -->
218            <enum name="pin" value="1"/>
219            <!-- The view will scroll in a parallax fashion. See the
220                 layout_collapseParallaxMultiplier attribute to change the multiplier. -->
221            <enum name="parallax" value="2"/>
222        </attr>
223
224        <!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
225             be between 0.0 and 1.0. -->
226        <attr name="layout_collapseParallaxMultiplier" format="float"/>
227    </declare-styleable>
228
229</resources>
230
231