diff options
author | Matthias Bosc <matthias.bosc@gmail.com> | 2013-03-23 18:36:38 +0100 |
---|---|---|
committer | Matthias Bosc <matthias.bosc@gmail.com> | 2013-03-26 16:20:02 +0100 |
commit | b50f25a73c76c6c6338e6502105333acec3b953d (patch) | |
tree | 1f58c1aa87b57861763ef22e6d8444c21276d7cc /src | |
parent | 7ce94bfb31c10b57de88c10844a8345a0ffde21e (diff) | |
download | packages_apps_trebuchet-b50f25a73c76c6c6338e6502105333acec3b953d.zip packages_apps_trebuchet-b50f25a73c76c6c6338e6502105333acec3b953d.tar.gz packages_apps_trebuchet-b50f25a73c76c6c6338e6502105333acec3b953d.tar.bz2 |
Trebuchet Settings: add setDisplayHomeAsUpEnabled
patch 3: cleaner imports
Change-Id: Ib7150bf248feb343042b1b8cc20775bae1d27279
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/preference/Preferences.java | 16 |
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 |