动作条按钮背景 [英] Actionbar button background

查看:147
本文介绍了动作条按钮背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想既为pressed而不是pressed状态的图像自定义动作条按钮。我把绘制选择在Android上:图标有两种状态(pressed而不是pressed)。问题是,如果我preSS按钮,我仍然有蓝色背景(ICS HOLO风格)随着我的pressed按钮图标。如何从动作条定制图标按钮删除这种行为?

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?

感谢

推荐答案

我已经解决了这一问题将

I have fixed the problem putting

 <item name="android:selectableItemBackground">@color/transparent</item>

在styles.xml。我认为这将影响到所有选择的款式,但是现在看来,这只是影响了动作条。

in styles.xml. I thought it would have affected all the select styles but it seems it affects just the actionbar.

这篇关于动作条按钮背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆