After reading the following question, I still can't figure out how to replace my Navigation Drawer
's menu with a simple back arrow that lets my user go back to the previous Fragment
.
So far I'm able to hide the button to access the Drawer
like such:
public void setDrawerState(boolean isEnabled) {
if ( isEnabled ) {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
toggle.setDrawerIndicatorEnabled(true);
toggle.syncState();
}
else {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
toggle.setDrawerIndicatorEnabled(false);
toggle.syncState();
}
}
How may I add the back arrow at its place?