Display back button on action bar

I’m trying to display a Back button on the Action bar to move previous page/activity or to the main page (first opening).
And I can not do it.

my code.

ActionBar actionBar = getActionBar();
actionBar.setHomeButtonEnabled(true);

the code is in onCreate.

25 Answers
25

Leave a Comment