From 873db6c439af95a8c721489833d7f44a7683138c Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Sun, 3 Jul 2022 12:27:45 -0500 Subject: [PATCH] [android] fix MauiSplashScreen on Android 12+ (#8394) Fixes: https://github.com/dotnet/maui/issues/7404 Context: https://developer.android.com/guide/topics/ui/splash-screen#set-theme Reviewing a lot of the feedback around splash screens, I tried: 1. Rename `splash.svg` to `splash2.svg` 2. Change the .NET splash logo from white to blank. I found these changes worked fine on Android < 12, but I did not see my changes on Android 12+! This was more troubling when I changed the `MauiSplashScreen` `Color` to white. After some review, it looks like we need to define: @color/maui_splash_color @drawable/maui_splash With these changes in place, the splash screen is working for me in Android 12+. I believe we implemented `MauiSplashScreen` while Android 12 was still in beta, so we just didn't notice this behavior. We also were sharing the same `.svg` file for the app icon and splash screen previously, which may have confused or hidden this issue. --- src/Core/src/Platform/Android/Resources/values/styles.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Core/src/Platform/Android/Resources/values/styles.xml b/src/Core/src/Platform/Android/Resources/values/styles.xml index 2af39ec0c53d..c33b209fdd7e 100644 --- a/src/Core/src/Platform/Android/Resources/values/styles.xml +++ b/src/Core/src/Platform/Android/Resources/values/styles.xml @@ -29,6 +29,12 @@