I'm trying to styling my appcompat-v7 toolbar to have a different background color for my overflow menu.
I tried to use the themes for my app and styles for my toolbar, but I was not able to achieve it.
This is my toolbar:
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
app:theme="@style/AppToolbarTheme"
android:layout_height="wrap_content">
Here is the style I created:
<style name="AppToolbarTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColorSecondary">@color/cian</item>
</style>
My main theme is extending Theme.AppCompat.Light.
Does anybody knows how can I do that? If is not possible using the styles is there any other way to achieve it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…