-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add better support for Android 12+ Splash Screen APIs #9794
Comments
Great news!!!. Will this workaround work for xamarin forms too? |
I don't think forms has resizetizer as part of it... However, you can use the same xml and add it to your own project - whatever you called your drawable files. The trick is really to set thesplash size somewhere to a small size and put your image in there. But, just for Android 12+ |
I've tried the above work around multiple times in multiple ways and it will not compile. First it looks for your splash file in the same directory as the XML file. When I copy the file in there it gives me a System.IO.Exception error - process cannot access the file because it's being used by another process. If I try and change the splash image name and update the XML file to the new name, then I get a file can't be found error, and failed linking file resources error. Maybe this just needs more instructions, or maybe it's not working with the GA of MAUI (6.0.400). |
Workaround is not working for me either unfortunately. The file is called splashscreen.svg and I've tried @drawable/splashscreen, @drawable/splashscreen.svg and neither work. |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
Description
As part of Android's ongoing improvements and changes to splash screens, Android 12+ has additional image requirements:
The first issue was that images were not showing at all because of new things, but that was fixed in #8394
However, those changes also missed the image size requirements. As of now, the image is still the large sizes from the source image which results in it being clipped. This issue is to track any work to automatically fit the screen.
Workaround
Add a file into your .NET MAUI app with this exact name:
Platforms\Android\Resources\drawable\maui_splash.xml
Related:
and was fixed in this PR [android] fix MauiSplashScreen on Android 12+ #8394
The text was updated successfully, but these errors were encountered: