From dac9bf360acc2f753dedeba1e45d9f51eaff0ac3 Mon Sep 17 00:00:00 2001 From: conradchen Date: Tue, 21 Dec 2021 19:34:06 -0500 Subject: [PATCH] [M3][Color] Set android:windowBackground to android:colorBackground The same remapping is done on API 21+ by framework base themes. On API levels lower than 21, AppCompat base themes "backport" the behavior to map window background to a separate color resources. With Material 3 we want a consistent and clear behavior, this CL explicitly remaps android:windowBackground to android:colorBackground so the behavior will be the same across all API levels. PiperOrigin-RevId: 417711790 --- .../android/material/theme/res/values/themes_base.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/java/com/google/android/material/theme/res/values/themes_base.xml b/lib/java/com/google/android/material/theme/res/values/themes_base.xml index 69ef9ddf46a..bf1e5b20246 100644 --- a/lib/java/com/google/android/material/theme/res/values/themes_base.xml +++ b/lib/java/com/google/android/material/theme/res/values/themes_base.xml @@ -51,6 +51,9 @@ @color/m3_sys_color_light_error_container @color/m3_sys_color_light_on_error_container + + ?android:attr/colorBackground + @color/m3_default_color_primary_text @color/m3_dark_default_color_primary_text @@ -245,6 +248,9 @@ @color/m3_sys_color_dark_error_container @color/m3_sys_color_dark_on_error_container + + ?android:attr/colorBackground + @color/m3_dark_default_color_primary_text @color/m3_default_color_primary_text