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