In my app the user can choose from 4 different themes. The time has come to create different menu icons for the different themes, but the icons do not show in the menu items. Any ideas?
Menu:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/Menu1"
android:orderInCategory="1"
style="?menu_addtolist" />
attrs.xml
<attr name="menu_addtolist" format="reference" />
themes.xml
<item name="menu_addtolist">@style/menu_green_addtolist</item>
styles.xml
<style name="menu_green_addtolist">
<item name="android:src">@drawable/menu_addtolist_green</item>
</style>
I did everything the way I had done with the other objects (buttons, layouts, texts). When I select a theme, the full theme changes, but there are no menu icons.
I changed the style in the menu item to another one I use in the app as a button style, and that did not make a change, while that style is definitely working. Maybe it is not possible to apply styles to menu items?
It looks like the answer is no. It is not possible to use themes with menu. Maybe because the menu has no (available) layout