Issue
My application uses ActionBarActivity and DrawerLayout and etc. i want to change the ActionBarDrawerToggle icon to be custom drawable.
in my code i use android.support.v7.widget.Toolbar as SupportActionBar
this is my code:
toolbar.setNavigationIcon(R.drawable.lifeline_shield);
setSupportActionBar(toolbar);
ActionBar actionbar = getSupportActionBar();
actionbar.setDisplayHomeAsUpEnabled(true);
actionbar.setDisplayShowTitleEnabled(false);
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, toolbar, R.string.somestring1, R.string.somestring2) ....
but still i see the Hamburger icon, so i have my own icon for opening the drawer. How can I solve this? without using deprecated api
Solution
Possible workaround:
mDrawerToggle.setDrawerIndicatorEnabled(false);
mDrawerToggle.setHomeAsUpIndicator(yourdrawableres);
Answered By - Čikić Nenad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.