简体   繁体   English

选择操作栏菜单项背景

[英]Actionbar menu item background on select

I am using sherlock actionbar and made custom action bar using differnt color (blue) . 我正在使用夏洛克动作栏,并使用不同的颜色(蓝色)制作了自定义动作栏。 When there are menu items . 有菜单项时。 as i click on menu item . 当我单击菜单项时。 items background turns in to gray . 项目背景变成灰色。 Not able to point which attribute of the style is making this effect had checked the most possibility . 无法指出样式的哪个属性正在使这种效果检查的可能性最大。 any help would be appreciated 任何帮助,将不胜感激

after some analysis found following answer 经过分析发现以下答案

    <item name="selectableItemBackground">@null</item>
    <item name="android:selectableItemBackground">@null</item>
    <item name="actionBarItemBackground">@null</item>
    <item name="android:actionBarItemBackground">@null</item>

The issue is you need to override these attributes in your application. 问题是您需要在应用程序中覆盖这些属性。 donot try changing in actionbar apk libary. 不要尝试在Actionbar APK库中更改。 that was the point i missed while fixing this. 这就是我在解决此问题时错过的要点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM