I want to change Hamburger Icon and replace it with any other custom Icon. How can I achieve this? Is it feasible?
I have go with android.support.v7 Toolbar & DrawerLayout- how to change Hamburger icon but it doesn't work for me.
I want to change Hamburger Icon and replace it with any other custom Icon. How can I achieve this? Is it feasible?
I have go with android.support.v7 Toolbar & DrawerLayout- how to change Hamburger icon but it doesn't work for me.
Try doing this
mToolbar.post(new Runnable() {
@Override
public void run() {
Drawable d = ResourcesCompat.getDrawable(getResources(), R.id.your_drawable, null);
mToolbar.setNavigationIcon(d);
}
});
Use this code
ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerToggle(this,
mDrawerLayout, null, your_drawable, your_drawable);
Refer this link: How to replace the hamburger icon used for ActionBarToggle on Android Toolbar with a custom drawable?
Or, you can use:
mDrawerToggle.setDrawerIndicatorEnabled(false);
mDrawerToggle.setHomeAsUpIndicator(drawable_name);