工具栏背景是深色,我希望文本和背面箭头为白色。我试过跟踪,但没用。
<style name="Theme.MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/blue</item>
<item name="colorPrimaryDark">@color/blue_darker</item>
<item name="colorAccent">@color/purple</item>
<!-- item name="android:textColorPrimary">@color/white</item--> // I don't want to set this, changes everywhere.
<item name="android:textColorSecondary">@color/white</item>
<item name="android:toolbarStyle">@style/AppTheme.ToolbarStyle</item>
<item name="toolbarStyle">@style/AppTheme.ToolbarStyle</item>
<item name="drawerArrowStyle">@style/AppTheme.DrawerArrowStyle</item>
</style>
<style name="AppTheme.ToolbarStyle" parent="Base.Widget.AppCompat.Toolbar">
<!--<item name="actionOverflowButtonStyle">@style/AppTheme.OverflowButtonStyle</item>-->
<item name="android:textColor">@color/white</item> // doesn't work
<item name="titleTextAppearance">@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse</item>
<item name="android:titleTextAppearance">@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse</item>
<item name="subtitleTextAppearance">@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle</item>
</style>