How to Change the left side menu icon on the Action Bar ? I have created this using Navigation Drawer Fragment in Android Studio. Now an Arrow pointing left is displayed "<-" but i need to display the = icon. Where should i change this ?
Asked
Active
Viewed 2,118 times
4
-
Have you added any fragment backstack ? – Rajen Raiyarela Aug 23 '15 at 05:42
-
when you say = icon. did u mean sandwich icon ?? – Ramesh Aug 23 '15 at 05:51
-
no fragment backstage and yes the sandwich icon. – MainakChoudhury Aug 23 '15 at 05:53
-
I suggest you follow the built in navigation drawer project in Android Studio when you create a new project – Shahzeb Aug 23 '15 at 06:06
-
Try this: http://stackoverflow.com/a/9265774/4224337 – Rami Aug 23 '15 at 09:26
2 Answers
1
You could use this format for your ActionBarDrawerToggle
:
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.drawable.CUSTOM_ICON, // Navigation menu toggle icon
R.string.DRAWER_OPEN, // Navigation drawer open description
R.string.DRAWER_CLOSE // Navigation drawer close description
)
Change your drawable and make sure it is the same name as the one in the code.

Malwinder Singh
- 6,644
- 14
- 65
- 103
0
To toggle the indicator you've to use:
public void toogleDrawer(boolean value){
mDrawerToggle.setDrawerIndicatorEnabled(!value);
getSupportActionBar().setDisplayHomeAsUpEnabled(value);
}
Please post the complete code relating to your drawer fragment, and action bar setup(if any) and also the relevant layouts. You've to research around a bit before asking the question. Check this question here : Cannot listen clicks on up caret
Everyone can provide specific answers to your problem if you add more content to it.

Community
- 1
- 1

Gurupad Mamadapur
- 989
- 1
- 13
- 24