From ae7af3fae65c0b211a4386e2b805ca4178b61713 Mon Sep 17 00:00:00 2001 From: Mill Chen Date: Thu, 2 May 2019 22:30:58 +0800 Subject: [PATCH] Change color of background for popup window Add an attribute colorPopupBackground and set it in both Material and DeviceDefault themes. This attribute in the Material theme will be set to colorBackground and it will be colorBackgroundFloating in the DeviceDefault theme. Bug: 129993543 Test: visual Change-Id: Id0572e38dd550930873d59161d84d0ab79283ee2 --- core/res/res/drawable/popup_background_material.xml | 2 +- core/res/res/values/attrs.xml | 2 ++ core/res/res/values/themes_device_defaults.xml | 2 ++ core/res/res/values/themes_material.xml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/res/res/drawable/popup_background_material.xml b/core/res/res/drawable/popup_background_material.xml index b1f0cf595771d..9ad7bfc68122b 100644 --- a/core/res/res/drawable/popup_background_material.xml +++ b/core/res/res/drawable/popup_background_material.xml @@ -20,6 +20,6 @@ + android:color="?attr/colorPopupBackground" /> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 489a08ac93999..dffc2e979c174 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -87,6 +87,8 @@ theme does not set this value, meaning it is based on whether the window is floating. --> + + diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml index 2e984601524de..08d6d0621cf41 100644 --- a/core/res/res/values/themes_device_defaults.xml +++ b/core/res/res/values/themes_device_defaults.xml @@ -216,6 +216,7 @@ easier. @color/accent_device_default_dark @color/error_color_device_default_dark @color/background_floating_device_default_dark + ?attr/colorBackgroundFloating @style/TextAppearance.Material @@ -422,6 +423,7 @@ please see themes_device_defaults.xml. @dimen/secondary_content_alpha_material_light 0.6 @color/error_color_material_light + ?attr/colorBackground @style/TextAppearance.Material