I did some searchs and tried a lot of solutions, but i'm going to the same problem:
The drawer hamburguer icon doesn't show until I swipe the drawer.
Here my code
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
setSupportActionBar(toolbar);
setupDrawer();
...
}
//calling the method bellow inside onCreate
public void setupDrawer(){
mDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close){
public void onDrawerClosed(View view) {
super.onDrawerClosed(view);
syncState();
}
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
syncState();
}
};
mDrawerToggle.setDrawerIndicatorEnabled(true);
drawerLayout.setDrawerListener(mDrawerToggle);
ActionBar actionBar = getActionBar();
if(actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowHomeEnabled(true);
actionBar.setIcon(R.drawable.ic_launcher);
}
}
I want it aways showing.