Check Mobile App
Read now
Start a Project

How to change the hamburger icon in android

Save

In this blog,

We will see how to change the default hamburger icon by programmatically. And will also see some style techniques for changing the default icon colors.

The hotdog or hamburger button is a button in a graphical user interface carrying an icon consisting of three parallel horizontal lines (displayed as ☰). It is often placed in the top left or top right of a user interface and is so called for its resemblance to a hotdog or hamburger.

Selection of a hotdog/hamburger button typically results in a menu of pages or options.

Change the default hamburger icon by program

There are few simple step to achieve our desire,

Step 1: Setup the drawer toggle

Step 2: Set the DrawerIndicatorEnabled to false

Step 3: Set the listener to the drawer Toggle because by above setup your hamburger button click will not work as previous,

Step 4: Finally set the icon which we want,

Change the default hamburger icon color 

There are also few simple steps to do achieve this,

Step 1: Simply Make a style in style.xml file,

 

Step 2: Finally create a style and set it to the drawerArrowStyle attribute,

 

Source: https://en.wikipedia.org/

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


13 comments

  • Azharul Islam
    great Example !!!!
  • Alireza
    thank u , its solved my icon problem !
  • Ved Prakash
    this is very helpfull for me thank you
    • anchit (Moderator)
      thanks
  • Ashif Shaikh
    thank s I have put the icon using style and programtcaly
  • Smrutisudha meher
    finally, this worked after none others did… thanks a lot for this
    • anchit (Moderator)
      thanks
  • Dhana
    Thank you.. it is useful
    • anchit (Moderator)
      Your Welcome 🙂
  • arTree
    Sooo helpfull and soooo useful big THANSK!
    • anchit (Moderator)
      Your Welcome
  • arTree
    Big THANKS, great job!
    • anchit (Moderator)
      Your Welcome
  • css.php

    When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

    Michael Urresta

    Michael Urresta

    Talk to Sales

    Global

    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home