Left Menu icon in the action bar on Android

How to change the menu icon on the left in the action bar? I created this using the Navigation Box Fragment in Android Studio. Now the arrow pointing to the left displays "<-", but I need to display the = icon. Where should I change this?

+4
source share
2 answers

You can 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 drawing and make sure it matches the name in the code.

+1
source

To switch the indicator you should use:

 public void toogleDrawer(boolean value){ mDrawerToggle.setDrawerIndicatorEnabled(!value); getSupportActionBar().setDisplayHomeAsUpEnabled(value); } 

Please post the full code related to your fragment of the box, and the settings of the action bar (if any), as well as the corresponding layouts. You should research a bit before asking a question. Check this question here: Cannot listen to carriage clicks

Everyone can provide specific answers to your problem if you add more content to it.

0
source

All Articles