Hi all, I am trying to figure out how to design my custom menu style by referencing this documentation - http://developer.android.com/intl/zh-CN/guide/topics/ui/themes.html
I somehow don't get it. All I want to do is to change the background color to something else than the existing grey shade. And maybe change the textstyle/size. This is what I understood. 1. Create styles.xml under res/values/style 2. Under styles.xml, define style/theme name and items to be used. I did something like this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="MyTheme"> <item name="textStyle">normal</item> <item name="panelBackground">@drawable/menu_background</item> <item name="panelBackgroundColor">#FFFFFFFF</item> <item name="panelTextColor">@color/theme_panel_text</item> <item name="panelTextSize">14sp</item> <item name="panelTextStyle">bold</item> <item name="menuItemBackground">@drawable/menuitem_background</ item> <item name="menuItemTextColor">?panelTextColor</item> <item name="menuItemTextSize">?panelTextSize</item> <item name="menuItemTextStyle">?panelTextStyle</item> </style> </resources> 3. I want to use a fixed menu theme throughout my application, so defining it in AndroidManifest.xml as android:theme="@style/MyTheme" 4. I get error while compiling as below: ERROR Error: No resource found that matches the given name: attr 'menuItemBackground'. ERROR Error: No resource found that matches the given name: attr 'menuItemTextColor'. ERROR Error: No resource found that matches the given name: attr 'menuItemTextSize'. ERROR Error: No resource found that matches the given name: attr 'menuItemTextStyle'. ERROR Error: No resource found that matches the given name: attr 'panelBackground'. ERROR Error: No resource found that matches the given name: attr 'panelBackgroundColor'. ERROR Error: No resource found that matches the given name: attr 'panelTextColor'. ERROR Error: No resource found that matches the given name: attr 'panelTextSize'. ERROR Error: No resource found that matches the given name: attr 'panelTextStyle'. ERROR Error: No resource found that matches the given name: attr 'textStyle'. I am not understanding. Please help. Abhi On Dec 16, 2:11 pm, Abhi <abhishek.r.sha...@gmail.com> wrote: > Is it possible to change the backgroundcolor, style of theMenu > items? > > Thanks, > > Abhishek -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en