操作栏按钮背景
我想用图像自定义操作栏按钮,以表示按下和未按下状态。我在 android:icon 上放置了一个可绘制选择器,具有两种状态(按下和未按下)。问题是,如果我按下按钮,我仍然有蓝色背景(ics Holo 样式)以及按下的按钮图标。如何从操作栏自定义图标按钮中删除此行为?
谢谢
I want to customize actionbar buttons with an image both for pressed and not pressed state. I put a drawable selector on android:icon with two states (pressed and not pressed). The problem is that, if I press the button, I still have the blue background (ics holo style) along with my pressed button icon. How can I remove this behaviour from actionbar customized icon buttons?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为更具体的方法是将此属性放在您的应用程序主题中:
如果您使用 ActionBarSherlock,也请放置此属性:
I think the more specific way is to put this attribute in your application Theme:
Also put this if you're using ActionBarSherlock:
我已经解决了放入 styles.xml 的问题
。我认为它会影响所有选择的样式,但它似乎只影响操作栏。
I have fixed the problem putting
in styles.xml. I thought it would have affected all the select styles but it seems it affects just the actionbar.