Fix usage of android:style/Theme.Quantum.Light.DialogWhenLarge
- make some Theme that are DialogWhenLarge but also respectful of
the Settings colors for the ActionBar
See bug: 15408411 Settings > Add account - needs to update theme
Change-Id: Ie96a94d03a2ea06fcbd19638f5d38e22e209fd31
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4388f0b..37586db 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -97,7 +97,7 @@
</activity>
<activity android:name="CreateShortcut" android:label="@string/settings_shortcut"
- android:theme="@style/Theme.CreateShortCut">
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
@@ -205,7 +205,7 @@
</activity>
<activity android:name=".wifi.WifiInfo"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings$WifiSettingsActivity">
<intent-filter>
@@ -216,7 +216,7 @@
</activity>
<activity android:name=".wifi.WifiConfigInfo"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings$WifiSettingsActivity">
<intent-filter>
@@ -227,7 +227,7 @@
</activity>
<activity android:name=".wifi.WifiAPITest"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge">
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" />
@@ -236,7 +236,7 @@
</activity>
<activity android:name=".wifi.WifiStatusTest"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge">
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" />
@@ -297,7 +297,7 @@
</activity-alias>
<activity android:name=".bluetooth.DevicePickerActivity"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:label="@string/device_picker"
android:clearTaskOnLaunch="true">
<intent-filter>
@@ -570,7 +570,7 @@
</activity-alias>
<activity android:name="Settings$DeviceInfoSettingsActivity"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:label="@string/device_info_settings"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings">
@@ -862,7 +862,7 @@
</activity>
<activity android:name="SetFullBackupPassword"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:exported="false">
</activity>
@@ -906,7 +906,7 @@
<activity android:name="DeviceAdminAdd"
android:label="@string/device_admin_add_title"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.app.action.ADD_DEVICE_ADMIN" />
@@ -916,7 +916,7 @@
<activity android:name="IccLockSettings"
android:label="@string/sim_lock_settings"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:process="com.android.phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -1033,7 +1033,7 @@
<!-- Runs in the phone process since it needs access to the Phone object -->
<activity android:name=".deviceinfo.Status"
android:label="@string/device_status_activity_title"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"
android:process="com.android.phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -1060,7 +1060,7 @@
</activity>
<activity android:name=".deviceinfo.MiscFilesHandler"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"/>
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"/>
<activity android:name="ApnEditor"
android:label="@string/apn_edit">
@@ -1504,7 +1504,7 @@
<activity android:name="com.android.settings.accounts.ChooseAccountActivity"
android:label="@string/header_add_an_account"
android:configChanges="orientation|keyboardHidden|screenSize"
- android:theme="@android:style/Theme.Quantum.Light.DialogWhenLarge"/>
+ android:theme="@style/Theme.SubSettingsDialogWhenLarge"/>
<activity android:name=".CryptKeeper"
android:immersive="true"
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 453e0c9..41cb0c1 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -59,18 +59,6 @@
<item name="wifi_signal">@drawable/wifi_signal_light</item>
</style>
- <style name="Theme.CreateShortCut" parent="android:Theme.Quantum.Light.DialogWhenLarge">
- <item name="android:actionBarWidgetTheme">@android:style/ThemeOverlay.Quantum.ActionBarWidget</item>
- <item name="android:actionBarTheme">@android:style/ThemeOverlay.Quantum.Dark</item>
-
- <item name="android:colorPrimary">@color/actionbar_background_color</item>
- <!-- Used by the bouncing effect for ListView and ScrollView -->
- <item name="android:colorPrimaryLight">@color/actionbar_background_color</item>
- <!-- Used by the StatusBar and NavBar -->
- <item name="android:colorPrimaryDark">@color/actionbar_background_color</item>
- <item name="android:colorAccent">@color/quantum_orange_A200</item>
- </style>
-
<!-- Theme with no local references, used by AccountPreferenceBase. -->
<style name="Theme.SettingsBase" parent="@android:style/Theme.Quantum.Light.DarkActionBar" />
@@ -102,4 +90,22 @@
<item name="android:contentInsetStart">@dimen/actionbar_contentInsetStart</item>
</style>
+ <style name="Theme.DialogWhenLarge" parent="android:style/Theme.Quantum.Light.DialogWhenLarge">
+ <item name="android:colorPrimary">@color/actionbar_background_color</item>
+ <!-- Used by the bouncing effect for ListView and ScrollView -->
+ <item name="android:colorPrimaryLight">@color/actionbar_background_color</item>
+ <!-- Used by the StatusBar and NavBar -->
+ <item name="android:colorPrimaryDark">@color/actionbar_background_color</item>
+ <item name="android:colorAccent">@color/quantum_orange_A200</item>
+ <!-- Redefine the ActionBar style for contentInsetStart -->
+ <item name="android:actionBarStyle">@style/Theme.ActionBar</item>
+ <!-- Redefine control activited color for progress bars and the like -->
+ <item name="android:colorControlActivated">@color/quantum_accent_color_light</item>
+ </style>
+
+ <style name="Theme.SubSettingsDialogWhenLarge" parent="Theme.DialogWhenLarge">
+ <item name="android:actionBarWidgetTheme">@android:style/ThemeOverlay.Quantum.ActionBarWidget</item>
+ <item name="android:actionBarTheme">@android:style/ThemeOverlay.Quantum.Dark</item>
+ </style>
+
</resources>