0

I have an item in menu.xml which should have a dark icon. When I use

android:icon="@android:drawable/ic_menu_add"

I can see light version. How to use default dark icons?

AppiDevo
  • 3,195
  • 3
  • 33
  • 51
  • Have you checked this [thread](http://stackoverflow.com/questions/14480075/actionbar-menu-default-icons) – Wildroid Mar 25 '15 at 00:24
  • I will ask another question. I have in sdk/platforsm/android-21/data/res/drawable-hdpi ic_menu_copy_holo_dark.png and ic_menu_copy_holo_light.png . How can I use them with default @android: prefix ? – AppiDevo Mar 25 '15 at 01:05
  • See my answer below - you can do same way for using default light icons if default app style is dark. – Wildroid Mar 25 '15 at 03:04

1 Answers1

1

For instance if the default app style is Light and you want to use the default dark icons for the menu.xml, it can be done like this:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/edit" android:icon="@drawable/ic_menu_copy_holo_dark"
android:title="Edit" />
<item android:id="@+id/prefs" android:icon="@drawable/ic_menu_copy_holo_dark"
android:title="Settings" />
<item android:id="@+id/share" android:icon="@drawable/ic_menu_copy_holo_dark"
android:title="Share" />
</menu>

Refer to Android versions menu drawables for drawables details

Wildroid
  • 864
  • 7
  • 9