我正在使用android.support.v7.widget.Toolbar并从这篇文章中了解如何将汉堡包图标的颜色更改为白色,但当我调用时,向上/向后箭头仍然是深色
setDisplayHomeAsUpEnabled(true);
Run Code Online (Sandbox Code Playgroud)
我怎样才能使箭头变白?
当我调用setDisplayHomeAsUpEnabled()时,这是我的工具栏的样子:

...这是我的styles.xml文件的相关部分:
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">#194C5F</item>
<item name="colorAccent">@color/accent</item>
<item name="drawerArrowStyle">@style/WhiteDrawerIconStyle</item>
</style>
<style name="WhiteDrawerIconStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>
Run Code Online (Sandbox Code Playgroud) 我的应用程序中有一个导航视图,在应用程序样式中添加两行之后:
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
Run Code Online (Sandbox Code Playgroud)
导航图标颜色更改为黑色,对于这个问题,我在样式中添加了以下行:
<item name="android:textColorSecondary">@android:color/white</item>
Run Code Online (Sandbox Code Playgroud)
现在导航图标又是白色的,但现在我有一个新问题。使用上面的代码,导航项的标题也改变了颜色。
我没有找到解决此干扰的方法
风格 :
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:textColorSecondary">@android:color/white</item>
</style>
Run Code Online (Sandbox Code Playgroud)
导航菜单:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view">
<group
android:id="@+id/testGRP"
android:checkableBehavior="single"
>
<item android:title="???? : ?????? ????"
android:id="@+id/menuItem_StudentList11"
android:icon="@drawable/ic_arrow_drop_up"
/>
<item android:title="???? ????"
android:id="@+id/menuItem_StudentList_Quize1"
android:icon="@drawable/all_exam_icon"
/>
<item android:title="@string/Navigation_StudentList3"
android:id="@+id/menuItem_StudentList_Quize"
android:icon="@drawable/all_exam_icon"
/>
</group>
<item android:title="????????:"> //this line is title
<menu>
<item android:title="@string/Navigation_StudentList4"
android:id="@+id/menuItem_StudentList_MidTerm"
android:icon="@drawable/all_exam_icon"
/> …Run Code Online (Sandbox Code Playgroud) android android-appcompat android-styles android-toolbar android-navigationview