Change Toolbar background color programmatically does not change Toolbar Title Background color

前端 未结 5 2160
南笙
南笙 2020-12-18 18:11

I´m trying to change the toolbar Background color programmatically by doing this:

getSupportActionBar().setBackgroundDrawable(newColorDrawable(getResources()         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-18 18:45

    In my style I changed

            @color/background
    

    to

            @color/background
    

    and that seems to have fixed it for me.

提交回复
热议问题