How to change background color of the snackbar?

后端 未结 16 807
温柔的废话
温柔的废话 2020-12-07 19:28

I am showing snackbar in DialogFragment Within the Positive click of alertDialog. Here is my code snippet.

Snackbar snackbar = Snackbar.make(view, \"Please e         


        
16条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 20:12

    If you want to define a background color for all your Snackbars, just override the design_snackbar_background_color value somewhere in your resources. For example:

    @color/colorPrimaryLight
    

提交回复
热议问题