Maui splash screen is not scaled correctly - maui

I'm building a Maui mobile app (android and ios). I have a problem, that my splash screen is not scaled correctly. I have defined it this way in the project csproj file:
<MauiSplashScreen Include="Resources\Images\splashscreen.png" Color="#66B3FF" BaseSize="512,512" />
File format is png and size 482 x 482. The image should be scaled down to fit the screen, but it's cropped at the sides. I have tried with different BaseSize values. The parameter seems to have no effect at all. How can I resize the image to fit the screen? Is there an error in my configuration or is there a bug in Maui?
Edit:
Alternatively, is it possible to disable the default splash screen and use a completely custom, xaml based splash screen in maui?

There is an existed issue about MauiSplashScreen resizetizering issue on the github.
And according to the workaround in it, the image will be resize in the Maui Prject which target is .net 7.0.
So you can try to use the .net 7.0 and add the Resize = "true" in the .csproj such as:
<MauiSplashScreen Include="Resources\Images\splashscreen.png" Color="#66B3FF" BaseSize="512,512" `Resize = "true"`/>
In addition, I have created a new project and set the splash image as a png file which size is 482 x 482. And the image showed correctly.

Related

How to resize Splash Screen Image in MAUI?

I'm trying to add an image on Splash Screen and the image size is 512x512 but it is not showing correctly on the splash screen. So, is there a way to resize the splash screen image?
Yes, there is a known issue about this problem. And this issue has been moved to the Backlog milestone. This means that it is not going to be worked on for the coming release.
You can follow it up here: https://github.com/dotnet/maui/issues/10275 .
Similar issue here: https://github.com/dotnet/maui/pull/9797 .
Thanks for your support and feedback for maui.
You can refer to step 5 of my blog on how to add/change the Splash screen image.
Basically, you have to edit your project file & edit the MauiSplashScreen ItemGroup property BaseSize accordingly to fit your image.

adding svg image to splash screen flutter

I want to show a svg image in splash screen.
I tried flutter_native_splash package but it's only work with jpg & png. Is there any alternative way to add svg image to splash screen?
You could implement it manually for Android and iOS like described in the docs.
For Android you can use a tool like Respresso to convert your SVG to an Android vector drawable.
Xcode 12 and higher also supports SVG in storyboards as far as I know.

scalable ios splash image in xamarin forms

I am working with xamarin forms and now I am seting the IOS splash image in the splash.storyboard... I followed some tutorials and I setted "W any x H any" and "generic" in the configurations required...The image appears, it is a background image. The problems is: If I select the GENERIC option, the image is too large and in the iphone it doesnt seem good...I need a Scalable Splah image, how can I do that?
I am using windows for it...but I can use a mac too.
You can add an ImageView into the ViewController instead of setting the BackgroundImage of the root view. With this, you can have the flexibility to set constraint according to your needs. You can learn more about auto layout HERE.
In addition, you can also set image with different resolution in iPhone and iPad inside your asset catalog.

How to add these three files properly?"Default.png, Default-568h#2x.png, Default#2x.png" for universal app for iPhone/iPad?

I added "Default.png, Default-568h#2x.png, Default#2x.png" these three files in my universal project for splash image, I have three diffrent image and the resolution exactly the same as mention in apple docs, for iPad 768 * 1024 , for iphone-4s -> 320 * 480 , for iphone 5-> 640 * 1136.
But my problem is that when I rum on iphone4s- iphone5 the splash rum properly, but when I run on Ipad the Deafault.png splash not showing instead of it takes reference from Default-568h#2x.png. The Default-568h#2x.png is showing on the iPad instead of Deafault.png and the image got blur and shrink on ipad also, beacuse Deafault.png not showing. How to slove this problem.
Any Idea or suggestion from experts would be highly welcome.
Launch image naming should be similar like this for universal application.
iPhone > Default~iPhone.png,Default#2x~iPhone.png & Default-568h#2x.png.
iPad > Default-Portrait~iPad.png,Default-Portrait#2x~iPad.png,Default-Landscape~iPad.png,Default-Landscape#2x~iPad.png
Please refere the following link for more details regarding image resolutions
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
and for image naming conventions use the following link
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html
First I would like to suggest that,
Preapre all Images,
Select Project from Project Navigator And Go to Summary and scroll down this
screen appears, then right click on that and choose file from your
computer it will automatically copied to project and it will entered
in plist file also..
if your application is universal then you have
to set for iPhone and iPad Both.
`
See the offical document at chapter App Launch (Default) Images:
App Launch (Default) Images
Only you should do is set the launch image a proper name with relative size, then add those images to the project. Xcode will help you to display it correctly when app launching.

Splash Screen Retina 3.5

I'm not able to add splash screen for Retina device 3.5 in launch image, And while running with basic images its showing the following error,
Can any one help me to solve this issue.
Just Create another Default splash image with name Default#2x.png and store it in your project.
Just create this image with double size of original Default.png image...
first check...in your project Directory...Default#2x.png is available or not....
if yes then remove...and clean project...after then add once again...