dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.06k stars 1.73k forks source link

[MAUI] Set the Resize attribute to “False” for MauiSplashScreen, it will keep previous SplashScreen’s app icon and icon background. #25217

Open samhouts opened 1 week ago

samhouts commented 1 week ago
Affected Branch: main
Affected Build: 17.8.0 Preview 2.0 [34308.144.main]
Version info:
  • .NET SDK: 8.0.100
  • Sdk-manifest: 8.0.100
  • microsoft.net.sdk.android: 34.0.43
  • microsoft.net.sdk.maui:  8.0.1

Steps to reproduce:
1.Create a new .NET MAUI project, change Framework to net8.0-android.
2. Start debugging, observe the Splash Screen that displays blue background with white clear .NET icon.
3.Right-Click the project node in the Solution Explorer and select Edit Project File
5.Locate the MauiSplashScreen node in the file, change color to Green, and set the Resize attribute to “False”, to stop vector images being resized, just like below:
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="Green" Resize="False" BaseSize="128,128" />
6.Debug the app once more and observe the Splash Screen 

Actual:  Resize="False" attribute let it keeps previous SplashScreen’s app icon and icon background.
Image
Expected: Resize="False" attribute is to stop vector images being resized, it should just keep app icon does not change size, shouldn't keep the icon's background color as previous SplashScreen’s background color.

View on AzDO

Zhanglirong-Winnie commented 6 days ago

This issue has been verified using Visual Studio 17.12.0 Preview 2.1(8.0.82 & 8.0.91). Can repro this issue on Android platform.