attrs.xml revision b7f9224b1495db47eb8fd813b5912250e900770a
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:elevation" />
44        <attr name="android:background" />
45        <attr name="android:fitsSystemWindows" />
46        <attr name="android:maxWidth" />
47        <attr name="itemTint" format="color|reference" />
48        <attr name="itemBackground" format="reference" />
49    </declare-styleable>
50
51    <declare-styleable name="TabLayout">
52        <attr name="tabIndicatorColor" format="color" />
53        <attr name="tabIndicatorHeight" format="dimension" />
54        <attr name="tabContentStart" format="dimension" />
55
56        <attr name="tabBackground" format="reference" />
57
58        <attr name="tabMode">
59            <enum name="scrollable" value="0" />
60            <enum name="fixed" value="1" />
61        </attr>
62
63        <!-- Standard gravity constant that a child supplies to its parent.
64             Defines how the child view should be positioned, on both the X and Y axes,
65             within its enclosing layout. -->
66        <attr name="tabGravity">
67            <enum name="fill" value="0"/>
68            <enum name="center" value="1"/>
69        </attr>
70
71        <attr name="tabMinWidth" format="dimension" />
72        <attr name="tabMaxWidth" format="dimension" />
73
74        <attr name="tabTextAppearance" format="reference" />
75        <attr name="tabSelectedTextColor" format="color" />
76
77        <attr name="tabPaddingStart" format="dimension" />
78        <attr name="tabPaddingTop" format="dimension" />
79        <attr name="tabPaddingEnd" format="dimension" />
80        <attr name="tabPaddingBottom" format="dimension" />
81        <attr name="tabPadding" format="dimension" />
82    </declare-styleable>
83
84    <declare-styleable name="CoordinatorLayout">
85        <!-- A reference to an array of integers representing the
86             locations of horizontal keylines in dp from the starting edge.
87             Child views can refer to these keylines for alignment using
88             layout_keyline="index" where index is a 0-based index into
89             this array. -->
90        <attr name="keylines" format="reference" />
91    </declare-styleable>
92
93    <declare-styleable name="CoordinatorLayout_LayoutParams">
94        <attr name="android:layout_gravity" />
95        <!-- The class name of a Behavior class defining special runtime behavior
96             for this child view. -->
97        <attr name="layout_behavior" format="string" />
98        <!-- The id of an anchor view that this view should position relative to. -->
99        <attr name="layout_anchor" format="reference" />
100        <!-- The index of a keyline this view should position relative to.
101             android:layout_gravity will affect how the view aligns to the
102             specified keyline. -->
103        <attr name="layout_keyline" format="integer" />
104
105        <!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
106             within its parent's bounds.  -->
107        <attr name="layout_anchorGravity">
108            <!-- Push object to the top of its container, not changing its size. -->
109            <flag name="top" value="0x30" />
110            <!-- Push object to the bottom of its container, not changing its size. -->
111            <flag name="bottom" value="0x50" />
112            <!-- Push object to the left of its container, not changing its size. -->
113            <flag name="left" value="0x03" />
114            <!-- Push object to the right of its container, not changing its size. -->
115            <flag name="right" value="0x05" />
116            <!-- Place object in the vertical center of its container, not changing its size. -->
117            <flag name="center_vertical" value="0x10" />
118            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
119            <flag name="fill_vertical" value="0x70" />
120            <!-- Place object in the horizontal center of its container, not changing its size. -->
121            <flag name="center_horizontal" value="0x01" />
122            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
123            <flag name="fill_horizontal" value="0x07" />
124            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
125            <flag name="center" value="0x11" />
126            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
127            <flag name="fill" value="0x77" />
128            <!-- Additional option that can be set to have the top and/or bottom edges of
129                 the child clipped to its container's bounds.
130                 The clip will be based on the vertical gravity: a top gravity will clip the bottom
131                 edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
132            <flag name="clip_vertical" value="0x80" />
133            <!-- Additional option that can be set to have the left and/or right edges of
134                 the child clipped to its container's bounds.
135                 The clip will be based on the horizontal gravity: a left gravity will clip the right
136                 edge, a right gravity will clip the left edge, and neither will clip both edges. -->
137            <flag name="clip_horizontal" value="0x08" />
138            <!-- Push object to the beginning of its container, not changing its size. -->
139            <flag name="start" value="0x00800003" />
140            <!-- Push object to the end of its container, not changing its size. -->
141            <flag name="end" value="0x00800005" />
142        </attr>
143    </declare-styleable>
144
145    <declare-styleable name="TextInputLayout">
146        <attr name="hintTextAppearance" format="reference" />
147        <!-- The hint to display in the floating label -->
148        <attr name="android:hint" />
149        <!-- Whether the layout is laid out as if an error will be displayed -->
150        <attr name="errorEnabled" format="boolean" />
151        <!-- TextAppearance of any error message displayed -->
152        <attr name="errorTextAppearance" format="reference" />
153    </declare-styleable>
154
155    <declare-styleable name="SnackbarLayout">
156        <attr name="android:maxWidth" />
157        <attr name="maxActionInlineWidth" format="dimension" />
158    </declare-styleable>
159
160</resources>
161
162