I have an small issue with images. In my app I want to display a movie page with the poster in background. On top on that, some more information about the movie. The result page is in the following image:
All images are the same dimenstion 1920x1080. As you can see, the background image is stretch and it is not really clear. How can I fix the background cross platform to have a nice background?
Answers
In Android you need to simply match your Launcher Icon with the target device DPI:

For more details, refer to: https://www.wintellect.com/understanding-native-image-sizing-in-xamarin-forms-apps/
Thank you @yelinzh but I'm sure I didn't explain the problem.
I have only one image that comes from an Uri with always the same size. The images are very high quality and we use them in different devices.
I want to display a nice background without streching it.
For example
ContentView
ContentView
, I should resize the image based on the width of theContentView
.ContentView
, then I want to display only the part of the image fit in theContentView
Another way to see it is...
ContentView
in any orientationContentView
It is a kind of mask...
Try setting the Aspect property of your image to AspectFit or AspectFill
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=windows