Search code examples
androidandroid-5.0-lollipopandroid-toolbar

Set menu overflow icon to be white


I have a dummy app that I'm making just to get the hang of Android development. I managed to get a menu overflow icon to appear on my toolbar, but I can't seem to figure out how to change it to white.

I'm using a Toolbar widget (without support libraries; that's something I don't want to do).

Here is what I have: enter image description here

I just want to make the overflow menu white.

styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>

    <item name="android:colorPrimary">@color/primary</item>
    <item name="android:colorPrimaryDark">@color/primary_dark</item>
    <item name="android:colorAccent">@color/accent</item>
</style>


Solution

  • You want to change android:textColorSecondary like so:

    <?xml version="1.0" encoding="utf-8"?>
            <resources>
            <style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
                <item name="android:windowNoTitle">true</item>
                <item name="android:windowActionBar">false</item>
    
                <item name="android:colorPrimary">@color/primary</item>
                <item name="android:colorPrimaryDark">@color/primary_dark</item>
                <item name="android:colorAccent">@color/accent</item>
    
                <!-- Here you go. This changes overflow icon colour. -->
                <item name="android:textColorSecondary">@color/WHITE</item>    
            </style>