I have a Xamarin.Forms app, but this question is only concerning Android.
I have a splash screen with an logo and a background color which I want to update. I use a splash theme style, which refers to a xml containing the image.
Theme:
XML
Then I use a splash activity to make it work and it works perfectly.
Now I want to use an image for a background instead of a color, so what I did was to create this background image with the logo on top, save that as one image and use that as the splash screen. This is causing some problems.
The image displays too small on the screen and I want this image to fit the screen (thus fullscreen with a locked aspect ratio), but I cannot get it to work nicely. The only option I could find was 'fill', which causes the image to deform. I could get it perfect on my screen, but a screen with a different ratio might see the deformed image then. The image I have is a square to make sure that when using fit, the entire screen is filled. Now I'm simply looking for an method to make the image fit the screen, rather than fill the screen.
I tried to visualize my question here:
So I have a square image on the left and when displaying on the phone (right) then it should fit the screen without changing the aspect ratio.
I've read something wrapping the image inside the xml and set it there, but that didn't work for me.
I hope someone can help.