-3

I have seen so many solutions regarding same question. But no solution worked for me.

Here is the best solution to change menu item text color in toolbar.

While defining new style extend "AppTheme.AppBarOverlay" instead of "Theme.AppCompat.Light.DarkActionBar". This will not only change Menu item text color as well as keep default color of Navigation icon.

styles.xml

<style name="myCustomMenuTextApearance" parent="AppTheme.AppBarOverlay">
    <item name="actionMenuTextColor">@color/colorAccent</item>

Toolbar

<android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_scrollFlags="scroll|enterAlways"
            android:background="?attr/colorPrimary"
            android:theme="@style/myCustomMenuTextApearance"
            app:popupTheme="@style/AppTheme.PopupOverlay" />
Rohan Patel
  • 1,758
  • 2
  • 21
  • 38

1 Answers1

0

Use your theme in the file menu.xml because all the items you want to add in your toolbar are here. You can use the property tint of an item to change aspect color, i think.

yozzy
  • 344
  • 2
  • 15