如何更改 activity 工具栏中的菜单指示器颜色

How to change Menu indicator color in activity ToolBar

我想更改 activity ToolBar 中的菜单指示器颜色,现在它的颜色不是白色或者它有 alpha 选项,我想是白色

我正在使用 AppCompatActivity,这是我的工具栏 xml 代码

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="@color/primary"
android:elevation="2dp"
android:theme="@style/Base.ThemeOverlay.AppCompat.Dark"
xmlns:android="http://schemas.android.com/apk/res/android" />

谢谢

您可以自定义白色的溢出图标,并像这样在您的主题样式中应用该图标

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
      <item name="android:actionOverflowButtonStyle">@style/CustomOverFlow</item>     
</style>

<style name="CustomOverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
    <item name="android:src">@drawable/your_custom_icon</item>
</style>

您只需更改 colorControlNormal 属性。

 <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorControlNormal">#FFFFFF</item>
</style>