Primary color (sometimes) goes transparent

馋奶兔 提交于 2019-12-05 03:23:35

The problem is related with the way the toolbar's background is handled. It is shared between all instances of toolbar, so if you tend to change the toolbar's background alpha, you change the alpha of the drawable that is reused on other screens too.

Make sure you are not manipulating with the Toolbar's background properties, instead set the new background color/drawable each time you want to customize it.

Maybe these Support Library bugs are related to your issue.

https://code.google.com/p/android/issues/detail?id=78289
https://code.google.com/p/android/issues/detail?id=78346

Sadly, still not fixed in 21.0.2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!