summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/cyanogenmod/trebuchet/preference/Preferences.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/preference/Preferences.java b/src/com/cyanogenmod/trebuchet/preference/Preferences.java
index 8b18e2a..45174e1 100644
--- a/src/com/cyanogenmod/trebuchet/preference/Preferences.java
+++ b/src/com/cyanogenmod/trebuchet/preference/Preferences.java
@@ -26,6 +26,7 @@ import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.text.TextUtils;
import android.util.Log;
+import android.view.MenuItem;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -51,6 +52,21 @@ public class Preferences extends PreferenceActivity
super.onCreate(savedInstanceState);
mPreferences = getSharedPreferences(PreferencesProvider.PREFERENCES_KEY,
Context.MODE_PRIVATE);
+
+ getActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ onBackPressed();
+ finish();
+ return true;
+ default:
+ break;
+ }
+ return super.onOptionsItemSelected(item);
}
@Override