我使用以下主题:
<style name="LightTheme" parent="android:Theme.DeviceDefault.Light">
</style>
我也使用旧的动作栏,而不是新的工具栏。
但是,它仍然使用黑色主题:
- 标签页中的标签是黑色的
- 所有菜单都有深色背景
如何解决这个问题?
对于菜单,您可以在样式中使用actionOverflowMenuStyle
来给出背景颜色。这是在我的应用程序与toolbar
和Appcompat
工作。我还没有在其他(常规操作栏)上测试过。
<item name="actionOverflowMenuStyle">@style/CMOptionsMenu</item>
其中CMOptionsMenu
为:
<style name="CMOptionsMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
<item name="android:popupBackground">@color/ColorPrimaryDark</item>
</style>
使用Android ActionBar样式生成器:
http://jgilfelt.github.io/android-actionbarstylegenerator/