summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
index 2f5f210..152e361 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -26,6 +26,7 @@ import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v13.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
+import android.view.MenuItem;
import com.cyanogenmod.settings.device.R;
@@ -59,6 +60,7 @@ public class DeviceSettings extends FragmentActivity {
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
bar.setTitle(R.string.app_name);
+ bar.setDisplayHomeAsUpEnabled(true);
mTabsAdapter = new TabsAdapter(this, mViewPager);
mTabsAdapter.addTab(bar.newTab().setText(R.string.category_radio_title),
@@ -151,4 +153,14 @@ public class DeviceSettings extends FragmentActivity {
public void onTabReselected(Tab tab, FragmentTransaction ft) {
}
}
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ DeviceSettings.this.onBackPressed();
+ default:
+ return super.onOptionsItemSelected(item);
+ }
+ }
}