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