在android中选择动作栏自定义微调器时,如何使其成为透明光晕?
我正在应用程序中使用操作栏。我为我的操作栏创建了菜单和自定义导航项。当我点击我的菜单和按钮在我的行动栏,我可以透明我的辉光颜色。像这样 action_item_background.xml ab_item_background.xml 我在style.xml中添加了这些行在android中选择动作栏自定义微调器时,如何使其成为透明光晕?,android,android-actionbar,Android,Android Actionbar,我正在应用程序中使用操作栏。我为我的操作栏创建了菜单和自定义导航项。当我点击我的菜单和按钮在我的行动栏,我可以透明我的辉光颜色。像这样 action_item_background.xml ab_item_background.xml 我在style.xml中添加了这些行 <item name="android:selectableItemBackground">@drawable/ab_item_background</item> <item name="andr
<item name="android:selectableItemBackground">@drawable/ab_item_background</item>
<item name="android:actionBarItemBackground">@drawable/ab_item_background</item>
但当我单击微调器时,这些样式不适用于此。它是蓝色的。我不是在用夏洛克行动吧。我该怎么做?有人能告诉我如何解决这个问题吗?提前感谢。我终于找到了这个问题的解决方案。我使用这个链接 我选择了我需要的选项,生成样式并下载。我将所有文件复制到我的应用程序和相应的文件夹中。我可以做到这一点。我得到了准确的结果
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_shortAnimTime" >
<item
android:state_pressed="true"
android:drawable="@drawable/action_item_background" />
<item
android:drawable="@android:color/transparent" />
</selector>
<item name="android:selectableItemBackground">@drawable/ab_item_background</item>
<item name="android:actionBarItemBackground">@drawable/ab_item_background</item>