android - theme.xml 未在深色主题中设置应用栏颜色
问题描述
在我的主题.xml 我有
<item name="colorPrimary">@color/teal_200</item>
这将设置应用栏颜色 AOK
但是,如果我将我的 Themes.xml(夜间)设置为
<item name="colorPrimary">@color/teal_200</item>
我搞深色主题,颜色设置被忽略
谁能解释一下我错过了什么?
解决方案
如果您使用 Material Design,然后将其添加到您的 AppTheme
parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge"