Android menu item background

我们两清 提交于 2019-12-01 01:28:38

The style attribute for the menu background is android:panelFullBackground. It's not hackish like the other solution, so it's not as buggy.

Despite what the documentation says, it needs to be a resource (e.g. @android:color/black or @drawable/my_drawable), it will crash if you use a color value directly.

try to use android own menu icon like as setIcon(android.R.drawable.ic_menu_search)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!