summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-07-18 17:44:37 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-07-18 17:44:37 -0700
commit712df6cb7050a87985ab30b8d1bad909a6bc09aa (patch)
tree74a480fc06b493e5a775a19aa0bade23445b3416 /src
parentd40dd45c18a55d574d65b3a0ac16b59d76027049 (diff)
downloadpackages_apps_Settings-712df6cb7050a87985ab30b8d1bad909a6bc09aa.zip
packages_apps_Settings-712df6cb7050a87985ab30b8d1bad909a6bc09aa.tar.gz
packages_apps_Settings-712df6cb7050a87985ab30b8d1bad909a6bc09aa.tar.bz2
Fix the way we select and apply Themes
- do not override the DialogWhenLarge ones (they have their purpose) - apply the correct Theme to SubSettings and then as a consequence to the SwitchBar Change-Id: I83adabf72da03051f03fbd2121e1e71217fc0c6a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/SettingsActivity.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index a0f43fb..bb13fc3 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -482,11 +482,16 @@ public class SettingsActivity extends Activity
mIsShowingDashboard = className.equals(Settings.class.getName());
final boolean isSubSettings = className.equals(SubSettings.class.getName());
- // If this is a sub settings or not the main Dashboard and not a Shortcut and not initial
- // Fragment then apply the correct theme for the ActionBar content inset
+ // If this is a sub settings or not the main Dashboard and not a Shortcut and an initial
+ // Fragment then apply the SubSettings theme for the ActionBar content insets
if (isSubSettings ||
- (!mIsShowingDashboard && !mIsShortcut && (initialFragmentName == null))) {
- setTheme(R.style.Theme_SubSettings);
+ (!mIsShowingDashboard && !mIsShortcut && (initialFragmentName != null))) {
+ // Check also that we are not a Theme Dialog as we don't want to override them
+ final int themeResId = getThemeResId();
+ if (themeResId != R.style.Theme_DialogWhenLarge &&
+ themeResId != R.style.Theme_SubSettingsDialogWhenLarge) {
+ setTheme(R.style.Theme_SubSettings);
+ }
}
setContentView(mIsShowingDashboard ?