summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFábio Silva <fabio.fernando.osilva@gmail.com>2012-10-02 22:53:18 -0300
committerFábio Silva <fabio.fernando.osilva@gmail.com>2012-10-02 23:24:06 -0300
commit1da0730fbdfc1a55b3c9ebedb0026e9da5111c37 (patch)
treee64f7d768e4d78f7c5b09d571d8b6847d023ab15
parent431d2efae615e3f243a36b40da30945a224094b7 (diff)
downloaddevice_samsung_i9300-1da0730fbdfc1a55b3c9ebedb0026e9da5111c37.zip
device_samsung_i9300-1da0730fbdfc1a55b3c9ebedb0026e9da5111c37.tar.gz
device_samsung_i9300-1da0730fbdfc1a55b3c9ebedb0026e9da5111c37.tar.bz2
Fixed missing back button on ActionBar (default Settings behavior on submenus).
(indentation-fix again) Change-Id: I6f587bfb02314ce4b23de1ad5819942118d65582
-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);
+ }
+ }
}