/
styles.xml
101 lines (89 loc) · 5.35 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
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 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="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance">
<item name="android:textSize">@dimen/design_snackbar_text_size</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="Widget.Design.Snackbar" parent="android:Widget">
<item name="android:minWidth">@dimen/design_snackbar_min_width</item>
<item name="android:maxWidth">@dimen/design_snackbar_max_width</item>
<item name="android:background">@drawable/design_snackbar_background</item>
<item name="android:paddingLeft">@dimen/design_snackbar_padding_horizontal</item>
<item name="android:paddingRight">@dimen/design_snackbar_padding_horizontal</item>
<item name="elevation">@dimen/design_snackbar_elevation</item>
<item name="maxActionInlineWidth">@dimen/design_snackbar_action_inline_max_width</item>
<item name="animationMode">slide</item>
<item name="actionTextColorAlpha">@dimen/design_snackbar_action_text_color_alpha</item>
</style>
<style name="Base.Widget.MaterialComponents.Snackbar" parent="Widget.Design.Snackbar">
<!--
The snackbar view has a 8dp padding on left and right. Message Textview has a 8dp margin on left and right.
-->
<item name="android:paddingLeft">@dimen/mtrl_snackbar_padding_horizontal</item>
<item name="android:paddingRight">@dimen/mtrl_snackbar_padding_horizontal</item>
<item name="backgroundOverlayColorAlpha">@dimen/mtrl_snackbar_background_overlay_color_alpha</item>
<item name="actionTextColorAlpha">@dimen/mtrl_snackbar_action_text_color_alpha</item>
</style>
<style name="Widget.MaterialComponents.Snackbar" parent="Base.Widget.MaterialComponents.Snackbar">
<!-- Null out the background here so the programmatically defined default Snackbar background
will be used, which supports the Material color theming attributes. -->
<item name="android:background">@null</item>
<item name="android:layout_margin">@dimen/mtrl_snackbar_margin</item>
<item name="animationMode">fade</item>
</style>
<style name="Widget.MaterialComponents.Snackbar.FullWidth" parent="Base.Widget.MaterialComponents.Snackbar"/>
<style name="Widget.MaterialComponents.Snackbar.TextView" parent="Widget.AppCompat.TextView">
<item name="android:alpha">@dimen/material_emphasis_high_type</item>
<item name="android:ellipsize">end</item>
<item name="android:maxLines">@integer/design_snackbar_text_max_lines</item>
<item name="android:textAlignment" tools:ignore="NewApi">viewStart</item>
<item name="android:textAppearance">?attr/textAppearanceBody2</item>
<item name="android:textColor">?attr/colorSurface</item>
<item name="android:paddingTop">@dimen/design_snackbar_padding_vertical</item>
<item name="android:paddingBottom">@dimen/design_snackbar_padding_vertical</item>
<item name="android:layout_marginLeft">@dimen/mtrl_snackbar_message_margin_horizontal</item>
<item name="android:layout_marginRight">@dimen/mtrl_snackbar_message_margin_horizontal</item>
</style>
<!-- Style for an M3 Snackbar. -->
<style name="Base.Widget.Material3.Snackbar" parent="Base.Widget.MaterialComponents.Snackbar">
<item name="enforceMaterialTheme">true</item>
<item name="materialThemeOverlay">@style/ThemeOverlay.Material3.Snackbar</item>
<item name="backgroundTint">?attr/colorSurfaceInverse</item>
<item name="actionTextColorAlpha">@dimen/m3_snackbar_action_text_color_alpha</item>
</style>
<style name="Widget.Material3.Snackbar" parent="Base.Widget.Material3.Snackbar">
<!-- Null out the background here so the programmatically defined default Snackbar background
will be used, which supports the Material color theming attributes. -->
<item name="android:background">@null</item>
<item name="android:layout_margin">@dimen/m3_snackbar_margin</item>
<item name="animationMode">fade</item>
<item name="shapeAppearance">?attr/shapeAppearanceCornerExtraSmall</item>
</style>
<!-- Style for a full width M3 Snackbar. -->
<style name="Widget.Material3.Snackbar.FullWidth" parent="Base.Widget.Material3.Snackbar">
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.None</item>
</style>
<style name="Widget.Material3.Snackbar.TextView" parent="Widget.MaterialComponents.Snackbar.TextView">
<item name="android:alpha">@dimen/m3_snackbar_action_text_color_alpha</item>
<item name="android:textColor">?attr/colorOnSurfaceInverse</item>
<item name="android:textAppearance">?attr/textAppearanceBodyMedium</item>
</style>
<style name="ThemeOverlay.Material3.Snackbar" parent="">
<item name="colorOnSurface">?attr/colorOnBackground</item>
</style>
</resources>