This question has already been answered:
- Use Toolbar 2 replies
Put the toolbar and made the "Back" button. I do not know how to put a handler on it.
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); }