I added a Toolbar to my Activity with back arrow like this:
Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(myToolbar);
//add back arrow - but it doesn't go back, nothing happens when I click it
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
But when I click the back arrow, it doesn't go back to previous page