我想更改汉堡图标的图标颜色。我尝试了很多事情,但没有任何效果。这是我的 XML :
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:titleTextColor="@color/colorPrimaryDark"
android:id="@+id/toolbar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
android:elevation="4dp"/>
在 styles.xml 中,我有
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
答案 0 :(得分:0)
好像您正在使用AppCompat。请创建此样式或类似样式:
<style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
<item name="color">#D81B60</item>
</style>
然后在您的主题中使用它:
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>