AppCompat Toolbar: Change Overflow Icon Color in ActionMode

thisbytes picture thisbytes · Jan 17, 2015 · Viewed 41.3k times · Source

With the AppCompat Toolbar, I want to be able to change the color of the overflow menu icon on ActionMode change.

For example, the overflow icon will be white in normal Toolbar mode. And will turn black on ActionMode. So far, I have managed to change the background of the action mode as well as the title text. But I have yet to find a way to change the overflow menu icon color.

I know that there's an answer available: Change ActionMode Overflow icon

I tried the first solution and I wasn't able to find the overflow icon.

The second solution, even with a 50L delay causes the overflow menu icon to flash the ActionMode's intended color for a brief split second that is very jarring.

Answer

Piyush picture Piyush · Jun 30, 2015

Add the below line into your theme attribute:

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