/
styles.xml
121 lines (103 loc) · 6.23 KB
/
styles.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
114
115
116
117
118
119
120
121
<?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 xmlns:tools="http://schemas.android.com/tools">
<style name="Widget.MaterialComponents.MaterialButtonToggleGroup" parent="android:Widget">
<item name="singleSelection">false</item>
</style>
<!-- Defines the base Material button style. -->
<style name="Widget.MaterialComponents.Button" parent="Widget.AppCompat.Button">
<item name="enforceMaterialTheme">true</item>
<item name="enforceTextAppearance">true</item>
<item name="android:textAppearance">?attr/textAppearanceButton</item>
<item name="android:textColor">@color/mtrl_btn_text_color_selector</item>
<item name="android:paddingLeft">@dimen/mtrl_btn_padding_left</item>
<item name="android:paddingRight">@dimen/mtrl_btn_padding_right</item>
<item name="android:paddingTop">@dimen/mtrl_btn_padding_top</item>
<item name="android:paddingBottom">@dimen/mtrl_btn_padding_bottom</item>
<item name="android:insetLeft">0dp</item>
<item name="android:insetRight">0dp</item>
<item name="android:insetTop">@dimen/mtrl_btn_inset</item>
<item name="android:insetBottom">@dimen/mtrl_btn_inset</item>
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/mtrl_btn_state_list_anim</item>
<item name="cornerRadius">@null</item>
<item name="elevation">@dimen/mtrl_btn_elevation</item>
<item name="iconPadding">@dimen/mtrl_btn_icon_padding</item>
<item name="iconTint">@color/mtrl_btn_text_color_selector</item>
<item name="rippleColor">@color/mtrl_btn_ripple_color</item>
<item name="backgroundTint">@color/mtrl_btn_bg_color_selector</item>
<item name="shapeAppearance">?attr/shapeAppearanceSmallComponent</item>
</style>
<!-- Defines the style for an elevated MaterialButton with a start-gravity icon. This adjusts
padding slightly to achieve a better visual balance. This style should only be used with a
start-gravity icon button. If your icon is end-gravity, mirror the padding such that this
adjustment happens to the other side. -->
<style name="Widget.MaterialComponents.Button.Icon">
<item name="android:paddingLeft">@dimen/mtrl_btn_icon_btn_padding_left</item>
</style>
<style name="Widget.MaterialComponents.Button.UnelevatedButton">
<item name="android:stateListAnimator" tools:ignore="NewApi">@animator/mtrl_btn_unelevated_state_list_anim</item>
<item name="elevation">0dp</item>
</style>
<!-- Defines the style for an unelevated MaterialButton with a start-gravity icon. This adjusts
padding slightly to achieve a better visual balance. This style should only be used with a
start-gravity icon button. If your icon is end-gravity, mirror the padding such that this
adjustment happens to the other side. -->
<style name="Widget.MaterialComponents.Button.UnelevatedButton.Icon">
<item name="android:paddingLeft">@dimen/mtrl_btn_icon_btn_padding_left</item>
</style>
<style name="Widget.MaterialComponents.Button.TextButton" parent="Widget.MaterialComponents.Button.UnelevatedButton">
<item name="android:textColor">@color/mtrl_text_btn_text_color_selector</item>
<item name="android:paddingLeft">@dimen/mtrl_btn_text_btn_padding_left</item>
<item name="android:paddingRight">@dimen/mtrl_btn_text_btn_padding_right</item>
<item name="iconTint">@color/mtrl_text_btn_text_color_selector</item>
<item name="iconPadding">@dimen/mtrl_btn_text_btn_icon_padding</item>
<item name="backgroundTint">@color/mtrl_btn_text_btn_bg_color_selector</item>
<item name="rippleColor">@color/mtrl_btn_text_btn_ripple_color</item>
</style>
<style name="Widget.MaterialComponents.Button.TextButton.Icon">
<!-- Icon text button has the same padding as a regular text button -->
</style>
<!-- Button style to show in the Snackbar component. -->
<style name="Widget.MaterialComponents.Button.TextButton.Snackbar">
<item name="android:textColor">?attr/colorPrimary</item>
</style>
<style name="Widget.MaterialComponents.Button.OutlinedButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:paddingLeft">@dimen/mtrl_btn_padding_left</item>
<item name="android:paddingRight">@dimen/mtrl_btn_padding_right</item>
<item name="strokeColor">@color/mtrl_btn_stroke_color_selector</item>
<item name="strokeWidth">@dimen/mtrl_btn_stroke_size</item>
</style>
<!-- Defines the style for an outlined MaterialButton with a start-gravity icon. This adjusts
padding slightly to achieve a better visual balance. This style should only be used with a
start-gravity icon button. If your icon is end-gravity, mirror the padding such that this
adjustment happens to the other side. -->
<style name="Widget.MaterialComponents.Button.OutlinedButton.Icon">
<item name="android:paddingLeft">@dimen/mtrl_btn_icon_btn_padding_left</item>
</style>
<style name="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:minWidth">@dimen/mtrl_btn_dialog_btn_min_width</item>
<item name="android:lines">1</item>
<item name="android:ellipsize">end</item>
<item name="android:singleLine">true</item>
<item name="android:layout_marginStart">@dimen/mtrl_btn_text_btn_padding_left</item>
<item name="android:layout_marginLeft">@dimen/mtrl_btn_text_btn_padding_left</item>
</style>
<style name="Widget.MaterialComponents.Button.TextButton.Dialog.Flush">
<item name="android:layout_marginStart">0dp</item>
<item name="android:layout_marginLeft">0dp</item>
</style>
<style name="Widget.MaterialComponents.Button.TextButton.Dialog.Icon">
<!-- Icon text button has the same padding as a regular text button -->
</style>
</resources>