Change ActionBarDrawerToggle icon android in toolbar? Change ActionBarDrawerToggle icon android in toolbar? android android

Change ActionBarDrawerToggle icon android in toolbar?


For people who come across this SO question in future,

We have to disable drawer indicator

mDrawerToggle.setDrawerIndicatorEnabled(false);

and then set ToolBar's navigation button

 mToolbar.setNavigationIcon(R.drawable.navIcon);

P.S. after that we have to set Navigation click listner on toolbar and open NavigationDrawer manualy.likemToolbar.setNavigationOnClickListener :D


Try the code below:

getSupportActionBar().setHomeButtonEnabled(true);getSupportActionBar().setDisplayHomeAsUpEnabled(true);       getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_drawer);


mDrawerToggle.setDrawerIndicatorEnabled(false);

and open the drawer with

mImageView.setOnClickListener(new View.OnClickListener() {        @Override        public void onClick(View view) {            DrawerLayout drawer = findViewById(R.id.drawer_layout);            drawer.openDrawer(Gravity.START);        }    });