6

I've used the action bar style generator to generate a custom action bar theme for an app, and it works well after a few tweaks. My custom theme is based on Holo (the dark version) and changes the highlight colours. My action bar overflow menu correctly shows my custom state_pressed colour on the overflow items when I press them. I've set android:colorPressedHighlight to the colour I want, and put an appropriate drawable for android:selectableItemBackground.

The problem is on one of my test devices, which has a hard menu button. (It's a Samsung Galaxy S III.) When I show the overflow menu with the hard menu button, pressing an item from this menu gives it the default blue highlight. Either it uses another attr instead of android:selectableItemBackground, or it's taking it from another style. I'd like to know what attr it's using, or what style it's taking it from, so that I can set this colour.

P.S. Before anyone suggests it, I know that you can use android:panelBackground to set the background of the bottom menu. But I don't want to change the overall menu background, only the item background.

Dan Hulme
  • 14,779
  • 3
  • 46
  • 95
  • Did you ever find a solution for this? I've had a look through the platform resources and it seems the `panelMenuListTheme` attribute is a likely candidate, but unfortunately both it and the `Theme.Holo.CompactMenu` that it refers to are not publicly accessible. I'm considering this hack (http://stackoverflow.com/a/11438245/5171) to force use of the overflow menu as an alternative. – Dan Dyer Sep 05 '13 at 15:56
  • No, I still don't have a solution. – Dan Hulme Sep 05 '13 at 16:00
  • Is still a mystery how to accomplish that? I'm stuck on this customization – doplumi Feb 27 '14 at 18:55
  • @DanHulme How did you make the overflow menu work? I used ActionBar Style Generator too, but it only creates a background 9 patch drawable. Pressed background states are not changed. Care to specify it better? You could edit the question or post here in the comments the menu style used. It would really help. – doplumi Feb 28 '14 at 09:04
  • @domenicop There's already a question about that on this site. If it doesn't help, ask a new question and I'll come and look at it for you. – Dan Hulme Feb 28 '14 at 10:12

0 Answers0