I\'m swapping out the action bar for the tool bar, and I nearly have every piece of the puzzle in place. My issue is specifically if I navigate \'up\' and restore the naviga
In my case it was a matter of order, I needed to first set the toolbar and than set the on click listener. in this order:
//works
setSupportActionBar(myToolbar);
myToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openDrawer(view);
}
});
rather than this:
//doesn't work
myToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openDrawer(view);
}
});
setSupportActionBar(myToolbar);