summaryrefslogtreecommitdiffstats
path: root/CrespoParts
diff options
context:
space:
mode:
Diffstat (limited to 'CrespoParts')
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
index e868086..3325a53 100644
--- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -32,6 +32,7 @@ import android.os.IBinder;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
+import android.view.MenuItem;
import com.cyanogenmod.settings.device.R;
@@ -63,6 +64,7 @@ public class DeviceSettings extends Activity {
setContentView(mViewPager);
final ActionBar bar = getActionBar();
+ bar.setDisplayHomeAsUpEnabled(true);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
bar.setTitle(R.string.app_name);
@@ -84,6 +86,15 @@ public class DeviceSettings extends Activity {
outState.putInt("tab", getActionBar().getSelectedNavigationIndex());
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public static class TabsAdapter extends FragmentPagerAdapter
implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
private final Context mContext;