diff options
author | David van Tonder <david.vantonder@gmail.com> | 2013-04-16 10:27:13 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-04-16 10:27:13 -0700 |
commit | da04260b2994b38ebe58d794dae300470c14621f (patch) | |
tree | 5a47e60ff40ee4549efe17702d94f832bc0ce5fc /src | |
parent | e32cb9d660cbb0bb65dd84695f528b3bab981916 (diff) | |
parent | b50f25a73c76c6c6338e6502105333acec3b953d (diff) | |
download | packages_apps_trebuchet-da04260b2994b38ebe58d794dae300470c14621f.zip packages_apps_trebuchet-da04260b2994b38ebe58d794dae300470c14621f.tar.gz packages_apps_trebuchet-da04260b2994b38ebe58d794dae300470c14621f.tar.bz2 |
Merge "Trebuchet Settings: add setDisplayHomeAsUpEnabled" into cm-10.1
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 |