【发布时间】:2014-12-20 13:05:55
【问题描述】:
我目前正在开发一个实现 Appcompat 工具栏的应用程序。 现在我的问题是,如果我选择 Light Actionbar 作为基础,菜单是白色的,标题是黑色的。 我希望两者都是白色的。 如果我更改为深色操作栏作为基础,文本是白色的,但菜单会变暗。
截图如下:
我只希望标题文本颜色为白色。
这是我的styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorAccent">@color/accent</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
</style>
</resources>
这里是toolbar.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"/>
我希望你能帮助我。 提前致谢!
【问题讨论】:
标签: android styles android-appcompat