Android 工具栏上的溢出按钮更改颜色

Android 工具栏上的溢出按钮更改颜色,android,android-layout,Android,Android Layout,我想更改工具栏上溢出按钮3点的颜色,但我有一个问题。。。我检查了几个主题,找到了一个解决方案。。。但它只能在安卓5.0及更高版本上运行。。。 当然,我可以使用colorPrimary进行更改,但这不是我的解决方案。。 我只想更改溢出按钮的颜色。 如果需要额外信息,请评论 这是我的工具栏的声明: <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" andro

我想更改工具栏上溢出按钮3点的颜色,但我有一个问题。。。我检查了几个主题,找到了一个解决方案。。。但它只能在安卓5.0及更高版本上运行。。。 当然,我可以使用colorPrimary进行更改,但这不是我的解决方案。。 我只想更改溢出按钮的颜色。 如果需要额外信息,请评论

这是我的工具栏的声明:

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/blue_background"
android:elevation="4dp">
这是我的风格:

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
    <!--   your app branding color for the app bar -->
    <item name="colorPrimary">@color/blue_background</item>
    <!--   darker variant for the status bar and contextual app bars -->
    <!--<item name="android:colorPrimaryDark">@color/primary_dark</item>-->

    <!--   theme UI controls like checkboxes and text fields -->
    <item name="colorAccent">@color/search_button</item>

    <item name="android:textColorPrimary">@color/search_button</item>
    <item name="android:textColorSecondary">@color/search_button</item>
    <item name="android:logo">@drawable/dbc_logo_white</item>
    <item name="android:actionOverflowButtonStyle">@style/menuOverflow</item>

</style>

<style name="menuOverflow" parent="Widget.AppCompat.ActionButton.Overflow">
    <item name="android:src">@drawable/ic_action_overflow</item>
</style>

好吧,我想我有办法了:

<!-- Overflow Button Style. -->
<item name="actionOverflowButtonStyle">@style/menuOverflow</item>
如您所见,在您的样式中删除android:before actionOverFlowButtonStyle


android有很多选项:棒棒糖前不起作用,你可以尝试删除其中一些。

好的,我想我有解决方案:

<!-- Overflow Button Style. -->
<item name="actionOverflowButtonStyle">@style/menuOverflow</item>
如您所见,在您的样式中删除android:before actionOverFlowButtonStyle


android有很多选项:棒棒糖前不可用,您可以尝试删除其中一些。

ic_action_overflow是您首选颜色的图像吗@塞巴斯蒂安现在,是的。。。但如果是其他方法,我不必使用此图像…我也不明白这是我的整个风格文件,也许我没有看到什么…:看看我的回复!ic_action_溢出图像是否具有您喜欢的颜色@塞巴斯蒂安现在,是的。。。但如果是其他方法,我不必使用此图像…我也不明白这是我的整个风格文件,也许我没有看到什么…:看看我的回复!哈哈:也许你让我开心:它在我的手机上工作:我做了更多的测试,如果一切都好的话,我给你Y:抱歉迟到Y:实际上我认为你最好离开两个版本的产品线,以便兼容android和不兼容android:哈哈:也许你让我开心:它在我的手机上工作:我做了更多的测试,如果一切都会好的话,我给你Y:很抱歉这么晚了Y:事实上,我认为你最好留下两个版本的产品线,以便与android兼容或不兼容: