AppCompat Toolbar: Change Overflow Icon Color in ActionMode AppCompat Toolbar: Change Overflow Icon Color in ActionMode android android

AppCompat Toolbar: Change Overflow Icon Color in ActionMode


Add the below line into your theme attribute:

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


This can be achieved by setting the android:textColorSecondary theme attribute.

For example, suppose you have the following toolbar, which uses the theme MyToolbarStyle:

<android.support.v7.widget.Toolbar  xmlns:app="http://schemas.android.com/apk/res-auto"  android:id="@+id/main_toolbar"  android:layout_width="match_parent"  android:layout_height="wrap_content"  android:minHeight="?attr/actionBarSize"  theme="@style/MyToolbarStyle"/>

Next, define the style MyToolbarStyle, inheriting from ThemeOverlay.AppCompat.ActionBar. Finally, modify the color of the overflow icon by adding an item for android:textColorSecondary:

<style name="MyToolbarStyle" parent="ThemeOverlay.AppCompat.ActionBar">  <item name="android:textColorSecondary">#333333</item></style>


<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">     <item name="android:actionOverflowButtonStyle">@style/ActionButton.Overflow.Icon</item> </style> <style name="ActionButton.Overflow.Icon" parent="android:style/Widget.Holo.Light.ActionButton.Overflow">     <item name="android:src">@mipmap/yourwanticon</item> </style>