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.21k stars 1.75k forks source link

Grid auto height behaving differently between Windows and Android #14643

Open hartez opened 1 year ago

hartez commented 1 year ago

Discussed in https://github.com/dotnet/maui/discussions/14505

Originally posted by **MustacheEmperor** April 10, 2023 Hi, I'm trying to sort out if I'm doing something wrong or if this should be filed as an issue. I'm working on a xaml layout that displays a ListView of ViewCells each consisting of an image with text labels displayed underneath. My intent is a long feed of images that horizontally expand to the width of the screen and aspect-fill vertically without cropping. The below code displays as described on Windows, but on Android the images are all cropped to thin rectangles and appear to be covering up the text. I am new to Maui - is this my mistake, or an issue? Even setting a HeightRequest does not alter the actual pixel height of the image, it just blows it up within the cropped area. Using a VerticalStackLayout instead of a Grid manifests exactly the same behavior - the layout looks as I described above on Windows, on Android the images are the full width but cropped very short. ``` ``` Repro: https://github.com/MustacheEmperor/MauiAndroidLayoutIssue
ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

homeyf commented 10 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2. Can repro on android platforms with sample project. https://github.com/MustacheEmperor/MauiAndroidLayoutIssue image