[AndroidStudio] Change the color of the ActionBarDrawerToggle hamburger menu

As the title says. Personal notes.

If you want to make the hamburger menu white

MainActivity.java


        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer,toolbar,
                R.string.drawer_open,
                R.string.drawer_close);
        /*Get the drawable of the hamburger menu from toggle*/
        DrawerArrowDrawable arrowDrawable = toggle.getDrawerArrowDrawable();
        /*Color change*/
        arrowDrawable.setColor(getResources().getColor(R.color.colorWhite));
     /*Set the recolored drawable again*/
        toggle.setDrawerArrowDrawable(arrowDrawable);

that's all.

Please let me know if there is another good way.

Recommended Posts

[AndroidStudio] Change the color of the ActionBarDrawerToggle hamburger menu
[Eclipse] Change the color of the vertical ruler
[Swift] Change the color of SCN Node
<Android> Change the background color of the List row of ListView
I want to change the color of the upper control navigation bar (Control menu) in Liferay 7 / DXP
[Swift] Change the textColor of UIDatePicker
[Rails] Change the label name of f.label
Ransack sort_link How to change the color!
[swift5] How to change the color of TabBar or the color of item of TabBar with code
[Beginner] I tried to decorate the bar after displaying the details of the hamburger menu
Change the URL of the application of Eclipse project (Maven).
Change the timezone of the https-portal container to JST
How Microservices Change the Way of Developing Applications
Change the location folder of Docker image & container
[Active Admin] Color the title (panel) part of the form
[Rails] How to change the column name of the table
[Rails] Cancel / change the default password validation of devise
Change the storage quality of JPEG images in Java