summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values-watch/config_material.xml3
-rw-r--r--core/res/res/values-watch/themes_material.xml21
-rw-r--r--core/res/res/values/config_material.xml3
-rw-r--r--core/res/res/values/themes_material.xml17
4 files changed, 31 insertions, 13 deletions
diff --git a/core/res/res/values-watch/config_material.xml b/core/res/res/values-watch/config_material.xml
index 951c08897fe4..81b53e71b5d7 100644
--- a/core/res/res/values-watch/config_material.xml
+++ b/core/res/res/values-watch/config_material.xml
@@ -27,9 +27,6 @@
<!-- Use micro alert controller -->
<integer name="config_alertDialogController">1</integer>
- <!-- Dialog windows in watch should occupy the whole screen and not be floating. -->
- <bool name="config_dialogWindowIsFloating">false</bool>
-
<!-- Always overscan by default to ensure onApplyWindowInsets will always be called. -->
<bool name="config_windowOverscanByDefault">true</bool>
diff --git a/core/res/res/values-watch/themes_material.xml b/core/res/res/values-watch/themes_material.xml
index d92a9477808f..4ae4367e8bc7 100644
--- a/core/res/res/values-watch/themes_material.xml
+++ b/core/res/res/values-watch/themes_material.xml
@@ -38,4 +38,25 @@ please see styles_device_defaults.xml.
<item name="imeFullscreenBackground">?colorBackground</item>
<item name="imeExtractEnterAnimation">@anim/input_method_extract_enter</item>
</style>
+
+ <!-- Override behaviour to set the theme colours for dialogs, keep them the same. -->
+ <style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
+ <item name="windowIsFloating">false</item>
+ </style>
+
+ <!-- Force the background and floating colours to be the default colours. -->
+ <style name="Theme.Material.Dialog" parent="Theme.Material.BaseDialog">
+ <item name="colorBackground">@color/background_material_dark</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
+ <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
+ <item name="windowIsFloating">false</item>
+ </style>
+
+ <!-- Force the background and floating colours to be the default colours. -->
+ <style name="Theme.Material.Light.Dialog" parent="Theme.Material.Light.BaseDialog">
+ <item name="colorBackground">@color/background_material_light</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_light</item>
+ <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
+ <item name="windowIsFloating">false</item>
+ </style>
</resources>
diff --git a/core/res/res/values/config_material.xml b/core/res/res/values/config_material.xml
index f62678aaaa6b..a37be837d9f1 100644
--- a/core/res/res/values/config_material.xml
+++ b/core/res/res/values/config_material.xml
@@ -29,9 +29,6 @@
<!-- The alert controller to use for alert dialogs. -->
<integer name="config_alertDialogController">0</integer>
- <!-- True if dialog windows are floating. -->
- <bool name="config_dialogWindowIsFloating">true</bool>
-
<!-- True if windowOverscan should be on by default. -->
<bool name="config_windowOverscanByDefault">false</bool>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 0e4e060e85ff..881b9b34a168 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -864,17 +864,14 @@ please see themes_device_defaults.xml.
<item name="searchViewStyle">@style/Widget.Material.SearchView.ActionBar</item>
</style>
- <!-- Theme overlay that overrides window properties to display as a dialog. -->
- <style name="ThemeOverlay.Material.Dialog">
- <item name="colorBackgroundCacheHint">@null</item>
- <item name="colorBackground">?attr/colorBackgroundFloating</item>
-
+ <!-- Base theme for overlay dialogs, customize the colours in the actual dialog theme. -->
+ <style name="ThemeOverlay.Material.BaseDialog">
<item name="windowFrame">@null</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material</item>
<item name="windowTitleBackgroundStyle">@style/DialogWindowTitleBackground.Material</item>
<item name="windowBackground">@drawable/dialog_background_material</item>
<item name="windowElevation">@dimen/floating_window_z</item>
- <item name="windowIsFloating">@bool/config_dialogWindowIsFloating</item>
+ <item name="windowIsFloating">true</item>
<item name="windowContentOverlay">@null</item>
<item name="windowAnimationStyle">@style/Animation.Material.Dialog</item>
<item name="windowSoftInputMode">stateUnspecified|adjustPan</item>
@@ -897,6 +894,12 @@ please see themes_device_defaults.xml.
<item name="windowFixedHeightMinor">@null</item>
</style>
+ <!-- Theme overlay that overrides window properties to display as a dialog. -->
+ <style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
+ <item name="colorBackgroundCacheHint">@null</item>
+ <item name="colorBackground">?attr/colorBackgroundFloating</item>
+ </style>
+
<!-- Theme overlay that overrides window properties to display as a date picker dialog. -->
<style name="ThemeOverlay.Material.Dialog.DatePicker">
<item name="alertDialogStyle">@style/DatePickerDialog.Material</item>
@@ -1080,7 +1083,7 @@ please see themes_device_defaults.xml.
<item name="windowTitleBackgroundStyle">@style/DialogWindowTitleBackground.Material</item>
<item name="windowBackground">@drawable/dialog_background_material</item>
<item name="windowElevation">@dimen/floating_window_z</item>
- <item name="windowIsFloating">@bool/config_dialogWindowIsFloating</item>
+ <item name="windowIsFloating">true</item>
<item name="windowContentOverlay">@null</item>
<item name="windowAnimationStyle">@style/Animation.Material.Dialog</item>
<item name="windowSoftInputMode">stateUnspecified|adjustPan</item>