Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c637d4bd authored by Michael Kwan's avatar Michael Kwan Committed by Android (Google) Code Review
Browse files

Merge "Add better configurability for dialog theme colours." into nyc-mr1-dev

parents 939f8cae ee85faf4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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>

+21 −0
Original line number Diff line number Diff line
@@ -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>
+0 −3
Original line number Diff line number Diff line
@@ -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>

+10 −7
Original line number Diff line number Diff line
@@ -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>