-
Notifications
You must be signed in to change notification settings - Fork 3k
/
styles.xml
73 lines (66 loc) · 3.67 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
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2019 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
~
~ https://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" tools:ignore="NewApi">
<style name="Widget.MaterialComponents.Badge" parent="android:Widget">
<item name="badgeWidth">@dimen/mtrl_badge_size</item>
<item name="badgeHeight">@dimen/mtrl_badge_size</item>
<item name="badgeWithTextWidth">@dimen/mtrl_badge_with_text_size</item>
<item name="badgeWithTextHeight">@dimen/mtrl_badge_with_text_size</item>
<item name="badgeWidePadding">@dimen/mtrl_badge_long_text_horizontal_padding</item>
<item name="backgroundColor">?attr/colorError</item>
<item name="maxCharacterCount">@integer/mtrl_badge_max_character_count</item>
<item name="badgeGravity">TOP_END</item>
<item name="offsetAlignmentMode">legacy</item>
<item name="badgeTextAppearance">@style/TextAppearance.MaterialComponents.Badge</item>
<item name="badgeShapeAppearance">@style/ShapeAppearance.MaterialComponents.Badge</item>
<item name="badgeWithTextShapeAppearance">@style/ShapeAppearance.MaterialComponents.Badge</item>
</style>
<style name="Base.TextAppearance.MaterialComponents.Badge" parent="TextAppearance.AppCompat">
<!-- Fake Roboto Medium. -->
<item name="fontFamily">sans-serif-medium</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textStyle">bold</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">@dimen/mtrl_badge_text_size</item>
<item name="android:letterSpacing">0.0892857143</item>
<item name="android:textColor">?attr/colorOnError</item>
</style>
<style name="TextAppearance.MaterialComponents.Badge" parent="Base.TextAppearance.MaterialComponents.Badge"/>
<style name="ShapeAppearance.MaterialComponents.Badge">
<item name="cornerFamily">?attr/shapeCornerFamily</item>
<item name="cornerSize">50%</item>
</style>
<!-- M3 Badge -->
<style name="Widget.Material3.Badge" parent="Widget.MaterialComponents.Badge">
<item name="backgroundColor">@macro/m3_comp_badge_color</item>
<item name="badgeTextColor">@macro/m3_comp_badge_large_label_text_color</item>
<item name="offsetAlignmentMode">edge</item>
<!-- Badge "dot" without text -->
<item name="horizontalOffset">@dimen/m3_badge_offset</item>
<item name="verticalOffset">@dimen/m3_badge_offset</item>
<item name="badgeWidth">@dimen/m3_badge_size</item>
<item name="badgeHeight">@dimen/m3_badge_size</item>
<item name="badgeShapeAppearance">@style/ShapeAppearance.M3.Comp.Badge.Shape</item>
<!-- Badge with text -->
<item name="badgeWithTextWidth">@dimen/m3_badge_with_text_size</item>
<item name="badgeWithTextHeight">@dimen/m3_badge_with_text_size</item>
<item name="horizontalOffsetWithText">@dimen/m3_badge_with_text_offset</item>
<item name="verticalOffsetWithText">@dimen/m3_badge_with_text_offset</item>
<item name="badgeTextAppearance">@macro/m3_comp_badge_large_label_text_type</item>
<item name="badgeWithTextShapeAppearance">@style/ShapeAppearance.M3.Comp.Badge.Shape</item>
</style>
</resources>