/
attrs.xml
113 lines (104 loc) · 5.44 KB
/
attrs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Style to use for MaterialButtons in this theme. -->
<attr name="materialButtonStyle" format="reference"/>
<!-- Style to use for Material Icon Only Buttons in this theme. -->
<attr name="materialIconButtonStyle" format="reference"/>
<!-- Style to use for Filled Material Icon Only Buttons in this theme. -->
<attr name="materialIconButtonFilledStyle" format="reference"/>
<!-- Style to use for Filled Tonal Material Icon Only Buttons in this theme. -->
<attr name="materialIconButtonFilledTonalStyle" format="reference"/>
<!-- Style to use for Material Outlined Buttons in this theme. -->
<attr name="materialButtonOutlinedStyle" format="reference"/>
<!-- Style to use for MaterialButtonToggleGroups in this theme. -->
<attr name="materialButtonToggleGroupStyle" format="reference"/>
<declare-styleable name="MaterialButton">
<!-- Whether the button can be checked. -->
<attr name="android:checkable"/>
<attr name="android:insetLeft"/>
<attr name="android:insetRight"/>
<attr name="android:insetTop"/>
<attr name="android:insetBottom"/>
<!-- Background for the MaterialButton. If this is set to a drawable or color, MaterialButton
will respect this background and not create its own MaterialShapeDrawable for the
background. This means that the insets, shape appearance, and stroke will be ignored.
If this attribute is not set or is @empty or @null, a MaterialShapeDrawable will be used
for the background based on the insets, shape appearance, and stroke. -->
<attr name="android:background"/>
<attr name="backgroundTint"/>
<attr name="backgroundTintMode"/>
<!-- Elevation for the MaterialButton. -->
<attr name="elevation"/>
<!-- Icon drawable to display at the start of this view. -->
<attr name="icon" format="reference"/>
<!-- Specifies the width and height to use for the icon drawable. -->
<attr name="iconSize" format="dimension"/>
<!-- Padding between icon and button text. -->
<attr name="iconPadding" format="dimension"/>
<!-- Specifies how the icon should be positioned on the X axis. -->
<attr name="iconGravity">
<!-- Push icon to the start of the button. -->
<flag name="start" value="0x1"/>
<!-- Push the icon to the start of the text keeping a distance equal to
{@code iconPadding} from the text. -->
<flag name="textStart" value="0x2"/>
<!-- Push icon to the end of the button. -->
<flag name="end" value="0x3"/>
<!-- Push the icon to the end of the text keeping a distance equal to
{@code iconPadding} from the text. -->
<flag name="textEnd" value="0x4"/>
<!-- Push the icon to the top of the button. -->
<flag name="top" value="0x10"/>
<!-- Push the icon to the top of the text keeping a distance equal to
{@code iconPadding} from the text. -->
<flag name="textTop" value="0x20"/>
</attr>
<!-- Tint for icon drawable to display. -->
<attr name="iconTint" format="color"/>
<!-- Tint mode for icon drawable to display. -->
<attr name="iconTintMode"/>
<!-- Shape appearance style reference for MaterialButton. Attribute declaration is in the Shape
package. -->
<attr name="shapeAppearance"/>
<!-- Shape appearance overlay style reference for MaterialButton. To be used to augment
attributes declared in the shapeAppearance. Attribute declaration is in the Shape package.
-->
<attr name="shapeAppearanceOverlay"/>
<!-- Specifies the color used to draw the path outline of the button. Attribute type definition
is in resources package. -->
<attr name="strokeColor"/>
<!-- Width of the stroke path of the button. Default is 0. Attribute type definition is in
resources package. -->
<attr name="strokeWidth"/>
<!--
Specifies the radius for the corners of the button. Default is 0, for non-rounded corners.
-->
<attr name="cornerRadius" format="dimension"/>
<!-- Ripple color for the button. This may be a color state list, if the desired ripple color
should be stateful. Attribute type definition is in resources package. -->
<attr name="rippleColor"/>
</declare-styleable>
<declare-styleable name="MaterialButtonToggleGroup">
<!-- Whether only a single button in this group is allowed to be checked at any time. By
default, this is false and multiple buttons in this group are allowed to be checked at
once. -->
<attr name="singleSelection"/>
<!-- Whether we prevent all child buttons from being deselected.
It's false by default. -->
<attr name="selectionRequired"/>
<!-- The id of the child button that should be checked by default within this button group. -->
<attr name="checkedButton" format="reference"/>
</declare-styleable>
</resources>