Android popup menu icon color in theme

Viewed 107

I am using a DayNight material design theme in my application. Everything seems to be working ok until I used a PopupMenu to show some action on an entity. While background and text colors are ok, icons have the same color as background (white).

So, my questions are :

  • What is the default color of the icon in the popup menu?
  • What color should the icon drawable be, white or black?

Here is my colors defined in the theme :

        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryVariant">@color/primary_light</item>
        <item name="android:colorPrimaryDark">@color/primary_dark</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorOnPrimary">@color/on_primary</item>

        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/secondary</item>
        <item name="colorSecondaryVariant">@color/secondary_dark</item>
        <item name="colorOnSecondary">@color/on_secondary</item>

        <!-- Surface colors. -->
        <item name="colorSurface">@color/surface</item>
        <item name="colorOnSurface">@color/on_surface</item>

        <!-- Text colors. -->
        <item name="android:textColorPrimary">?colorOnSurface</item>
        <item name="android:textColorSecondary">@color/on_surface_66</item>

        <!-- Other colors. -->
        <item name="android:windowBackground">?colorSurface</item>
        <item name="android:colorBackground">?colorSurface</item>
        <item name="colorOnBackground">?colorOnSurface</item>
        <item name="colorAccent">?colorSecondary</item>

        <item name="colorControlNormal">?colorOnSurface</item>

and here is a screenshot of the popup menu :

enter image description here

0 Answers
Related