How to Change Color of Hamburger Icon in Material Design Navigation Drawer

How to change color of hamburger icon in material design navigation drawer

To change color of hamburger icon you have to open "style.xml" class, then try this code:

<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">

</style>

<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>

<style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/black</item>
</style>

So check <item name="color">@android:color/black</item> line. Just change your desired color here.

How to change color of Hamburger icon of Navigation Drawer in android studio?

In Your AppTheme add this

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>

<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>

how to change the color of the hamburger icon in the navigation view in android studio

I was able to figure out a way to change the hamburger icon color with this code I wrote this code in my style.xml

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/DrawerIcon</item>
<item name="actionOverflowButtonStyle">@style/MyActionButtonOverflow</item>

</style>

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="MyActionButtonOverflow" parent="Widget.AppCompat.Light.ActionButton.Overflow">
<item name="color">#ffd700</item>
</style>
<style name="DrawerIcon" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">#ffd700</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

result

Now add the below code to your Navigation view java activity which in my case is the HomeActivity

toolbar.setTitleTextColor(getResources().getColor(R.color.colorelabGold));

Now you get
result three

Flutter navigation drawer hamburger icon color change

Add iconTheme to your AppBar

@override
Widget build(BuildContext context) {
return Scaffold(
drawer: Drawer(),
appBar: AppBar(
title: Text("Navigation Drawer"),
iconTheme: IconThemeData(color: Colors.green),
),
);
}

You can also check other solutions here.

Change color of burger icon into android toolbar

Try using this :

 <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/toolbar"
android:fitsSystemWindows="true"
app:theme="@style/backArrowTheme"
app:popupTheme="@style/AppTheme"
>
</android.support.v7.widget.Toolbar>

<style name="backArrowTheme" parent="AppTheme">
<item name="android:textColorSecondary">Hexcode of color</item>
</style>

Android Material Design navigation drawer menu icon chage

Found a sloution myself. It was pretty easy indeed. All you have to do is set a toolbar style. In your style primary color act as a toolbar title and textScondary color act as a menu icon color.

    style name="GalaxyZooThemeToolbarDarkOverflow" parent="Theme.AppCompat.NoActionBar">
<item name="android:textColorPrimary">@color/headerColor</item>
<item name="android:iconPreview">@drawable/ic_launcher</item>

<item name="actionMenuTextColor">@color/colorPrimaryDark</item>
<item name="android:textColorSecondary">@color/headerColor</item>

Cannot change navigation drawer icon color android

In this case of new android studio with theme implemented we are just have to declare the style in theme.xml

<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>

<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">@color/white</item>
</style>


Related Topics



Leave a reply



Submit