diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ActionBarActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ActionBarActivity.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java index 06dad3d13..bc0557f1f 100644 --- a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java @@ -2,6 +2,7 @@ package de.pixart.messenger.ui; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; +import android.view.MenuItem; public abstract class ActionBarActivity extends AppCompatActivity { public static void configureActionBar(ActionBar actionBar) { @@ -14,4 +15,14 @@ public abstract class ActionBarActivity extends AppCompatActivity { actionBar.setDisplayHomeAsUpEnabled(upNavigation); } } + + @Override + public boolean onOptionsItemSelected(final MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + finish(); + break; + } + return super.onOptionsItemSelected(item); + } } |