【发布时间】:2015-07-05 20:08:39
【问题描述】:
我在使用 android lollipop 并使用以下样式作为我的主题 MyNavigationDrawerTheme
在样式 v14 中
<style name="MyNavigationDrawerTheme" parent="MaterialNavigationDrawerTheme.Light">
<item name="actionMenuTextColor">@color/white</item>
</style>
在材料抽屉theme.xml中(大部分与这个问题无关)
<style name="MaterialNavigationDrawerTheme.Light" parent="Theme.AppCompat.Light.NoActionBar" >
<item name="drawerType">@integer/DRAWERTYPE_ACCOUNTS</item>
<item name="drawerColor">#fafafa</item>
</style>
我知道主题 Theme.AppCompat.Light.NoActionBar 的操作栏有黑色文本,但是为什么当我包含该行时它没有改变
<item name="actionMenuTextColor">@color/white</item>
我已经尝试解决这个问题将近两天了,现在尝试了很多东西(例如here)但没有任何效果
任何想法
【问题讨论】:
-
如果您使用
...NoActionBar主题,您可以提供自己的Toolbar并指定其自己的android:theme属性。此属性指向的主题(通常源自ThemeOverlay.AppCompat.ActionBar或...Dark.ActionBar具有确定文本颜色的android:textColorPrimary属性。请勿在主主题中覆盖此颜色,它会在整个应用程序中发生变化。