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