I need help. How can I change the design of the text in snackbar in styles app? The change in the code does not interest me. I found the following code. But it is not worki
Thanks to shadowsheep I wrote these styles with Material Components. I also removed margins. You can compile his app to research Snackbar.
Where drawable/snackbar_background.xml is:
Don't forget to remove from Snackbar.make(), if you have added:
view.setBackgroundColor(ContextCompat.getColor(context, R.color.bg_color))
setActionTextColor(ContextCompat.getColor(context, R.color.button_color))
Unlike AlertDialog, Snackbar holds snackbarButtonStyle and snackbarTextViewStyle settings inside AppTheme (that's strange because yesterday they worked well inside MaterialSnackbarTheme).
As @StayCool said in comments, Snackbar currently uses transparency for background and text color (alpha = 0.5 - 0.6). Also they added round corners and margins. To remove background transparency, use either or drawable/snackbar_background.xml. You can see his variant.