How to change Options menu dots color for the theme "Theme.AppCompat.Light.NoActionBar"

Hari Krishnan picture Hari Krishnan · Jul 4, 2016 · Viewed 13.6k times · Source

To change the default option menu icon color(3 vertical dote), i have tried adding

<item name="android:textColorSecondary">@color/white</item>

But it doesn't make any change. I think it is not working coz my AppTheme parent is Theme.AppCompat.Light.NoActionBar. So can anybody help me on this?

Answer

Alex Styl picture Alex Styl · Jul 4, 2016

The easiest way of doing it is by adding

<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>

or

<item name="popupTheme">@style/ThemeOverlay.AppCompat.Dark</item>

to your primary Theme in order to change it to light or dark.

EDIT: In order to add any color for the overflow icon you would have to override the actionOverflowButtonStyle like so:

<style name="Theme.MyAppTheme" parent="Theme.AppCompat.NoActionBar">
    <item name="actionOverflowButtonStyle">@style/OverFlow</item>
  </style>

  <style name="OverFlow" parent="@style/Widget.AppCompat.Light.ActionButton.Overflow">
    <item name="android:src">@drawable/ic_overflow_icon</item>
  </style>

You can easily create your own overflow icon from websites like Android Asset Studio