Skip to content

Commit 3fb5661

Browse files
committed
fix snackbar theming
1 parent 8f01b93 commit 3fb5661

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ui/src/main/res/values/styles.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,25 @@
7676
<style name="Snabble.Rating.Positive" parent="@android:style/Widget.CompoundButton.RadioButton">
7777
<item name="android:button">@drawable/snabble_rating_positive</item>
7878
</style>
79+
80+
<style name="Widget.App.Snackbar" parent="Widget.MaterialComponents.Snackbar">
81+
<!--this child makes changes to the background color of the snackbar-->
82+
<item name="materialThemeOverlay">@style/ThemeOverlay.App.Snackbar</item>
83+
<!--if this is made 0 then the action button text color will be white-->
84+
<!--if this is 1 then the custom color can be set to action button text-->
85+
<item name="actionTextColorAlpha">1</item>
86+
</style>
87+
88+
<style name="Widget.App.SnackbarButton" parent="Widget.MaterialComponents.Button.TextButton.Snackbar">
89+
<item name="android:textColor">?attr/colorPrimary</item>
90+
</style>
91+
92+
<style name="Widget.App.SnackbarText" parent="Widget.MaterialComponents.Snackbar.TextView">
93+
<item name="android:textColor">?attr/colorOnSurface</item>
94+
</style>
95+
96+
<style name="ThemeOverlay.App.Snackbar" parent="">
97+
<item name="colorOnSurface">?attr/colorSurface</item>
98+
</style>
99+
79100
</resources>

0 commit comments

Comments
 (0)