Matias Hernandez
unread,Aug 27, 2012, 12:53:47 PM8/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to actionba...@googlegroups.com, Fernando Panizza
Hello there,
I have a question about the icons used for menu items. We've been using ABS for a while (excellent library BTW) and we've encountered the following problem. When building the menu, we assign drawables as icons for the menu items. In Android 4.0 these icons are shown in the action bar and not in the overflow menu, while in 2.x they are shown in the action bar and in the "native overflow" when the menu button is pressed (we don't use the ICS-like overflow button).
The problem occurs when using the Sherlock.Light theme and a Gingerbread device. In that case, the icons drawn in the action bar should be black / dark gray. However, when these options go into the overflow, the menu background is always black (independently of the theme), and the icon is therefore only faintly visible.
The question is: is there a way to fix this? At design theme we're not sure which icons will go where (since it depends on the device's width in dp). A possible workaround that we've considered is to modify the MenuBuilder.bindNativeOverflow() method in ABS to switch the icon (having previously added a "setOverflowIcon()" method or somesuch to MenuItem/MenuItemImpl), as we then know that the action will be drawn in the secondary menu. But I wondered if there is another (more reasonable) solution for this?
Best regards, and thanks for any responses,
- Matías