0

Various devices use various backgrounds for their options menu. The problem this causes me is that the gray-ish icons I use for my options menu buttons don't look great on darker menu backgrounds. From my reading and experimentation I see three options for dealing with this. Number 3 is the one I intend to do, but I have a question about implementing it. Also, I would be very interested in any general thoughts/advice about this issue:

  1. Use icons that look good regardless of the background color. Maybe dark-ish gray icons with white-ish outlines? This would be an easy option to implement, but getting the ideal icon is tricky.

  2. Set a custom background color. The code for doing this appears to be very hacky, and this results in an options menu that doesn't conform to the device theme.

  3. Have 2 sets of icons, programmatically set one light-ish menus and one for dark-ish menus. This seems promising aesthetically, but I can't find how to determine the color/lightness of the background?

ab11
  • 19,770
  • 42
  • 120
  • 207

1 Answers1

1

The best option (and the one I've done before without any problems) is to set a custom background color. It isn't really that hacky, if you understand how the Options Menu works. When the Options Menu is inflated, it references a View Object that it uses for the background of each button. The problem is, different device manufacturers use custom themes (blech). The way around this to ensure that your Options Menu always looks the same regardless of the device your application is running on is to create a custom View and set that as the background.

This is the best resource I've found for this issue:
http://bit.ly/ymc0Zc

I hope that helps!!

  • Well, 2 reasons I didn't want to do that. I'd prefer it to be consistent with the theme of device (though I'm not sure if anyone cares about this). And according to the below thread, setting a custom background gets a bit hacky (though hacky isn't a huge deal) on 2.3. For those two reasons, I was just hoping for a "better" option. http://stackoverflow.com/questions/2944244/change-the-background-color-of-the-options-menu – ab11 Jan 24 '12 at 22:25
  • Yeah, that makes sense. As far as the theme of the device is concerned, it's pretty hard to cater to every single custom UI that's infiltrating the market today, haha. Your best bet is to do as you stated earlier - design the icons to work in any environment. Make the icons themselves a dark gray, but outline them in a white color that matches the Theme.light background. That way, when the phone uses a light theme, the outline is invisible and you're left with just your icon, but when the theme is dark there is the border that helps with visibility. –  Jan 24 '12 at 23:48
  • Wow, I just realized how long that comment was...I'm sorry, I tend to be long-winded, haha. –  Jan 24 '12 at 23:49
  • well, i'm going to just try to come up with some universally appealing icons, thanks for the response. – ab11 Jan 31 '12 at 22:17