I am having trouble with changing my navigation drawer icon to a custom one. I've currently had to implement the standard drawer icon which has 3 horizontal lines on top, but now I want to replace this with my custom drawer icon.
This is how my mDrawerToggle
is at the moment:
mDrawerToggle=new ActionBarDrawerToggle(this,
mDrawerLayout,
R.drawable.app_icon,
R.string.drawer_open) {
// My code
};
Here is the sample code taken from Creating a Navigation Drawer
Activity.class
You could use this format for your
mDrawerToggle
:Change your drawable and make sure it is the same name as the one in the code.
Use below code,it's working for V7 ActionBarDrawerToggle
This is the main layout file
This is the main Activity
finally at R.drawable.menuicon(you can give your image id) it will work.