maui icon indicating copy to clipboard operation
maui copied to clipboard

Too much spacing between two rows with a FlexLayout on Android.

Open pekspro opened this issue 2 years ago • 2 comments

Description

I have a FlexLayout that with three items looks that like this on Android and Windows:

image

With four items a new row is added. But on Android the spacing between the rows are too large, but it if fine on Windows.

image

Steps to Reproduce

  1. Create a new MAUI app.
  2. Replace the content in MainPage.xaml with this:
    <ScrollView>
        <FlexLayout
                Direction="Row"
                BackgroundColor="LightPink"
                AlignItems="Start"
                JustifyContent="Start"
                Wrap="Wrap"
                VerticalOptions="Start"
                >
                    <Grid HeightRequest="100" 
                          WidthRequest="100" 
                          BackgroundColor="AliceBlue"
                          Margin="4">
                        <Label  Text="One"
                                    TextColor="DarkBlue"
                                    HorizontalOptions="Center"
                                    VerticalOptions="Center"
                                    />
                    </Grid>
                    <Grid HeightRequest="100" 
                          WidthRequest="100" 
                          BackgroundColor="AliceBlue"
                          Margin="4">
                        <Label  Text="Two"
                                    TextColor="DarkBlue"
                                    HorizontalOptions="Center"
                                    VerticalOptions="Center"
                                    />
                    </Grid>
                    <Grid HeightRequest="100" 
                          WidthRequest="100" 
                          BackgroundColor="AliceBlue"
                          Margin="4">
                        <Label  Text="Three"
                                    TextColor="DarkBlue"
                                    HorizontalOptions="Center"
                                    VerticalOptions="Center"
                                    />
                    </Grid>
                    <Grid HeightRequest="100" 
                          WidthRequest="100" 
                          BackgroundColor="AliceBlue"
                          Margin="4">
                        <Label  Text="Four"
                                    TextColor="DarkBlue"
                                    HorizontalOptions="Center"
                                    VerticalOptions="Center"
                                    />
                    </Grid>
        </FlexLayout>
    </ScrollView>
  1. Run the application on Android and Windows.

Link to public reproduction project repository

https://github.com/pekspro/MauiIssues/tree/10698_Too_much_spacing_between_two_rows_with_a_FlexLayout

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

pekspro avatar Oct 14 '22 21:10 pekspro

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Oct 26 '22 18:10 ghost

I've updated sample application to .NET 7. The same issue remains.

pekspro avatar Nov 11 '22 17:11 pekspro

I'm having the same problem in .NET 7.

michaldivis avatar Mar 20 '23 07:03 michaldivis

Verified this issue with Visual Studio 17.7.0 Preview 1.0. Can repro on android platform with sample project. MauiIssues-10698_Too_much_spacing_between_two_rows_with_a_FlexLayout.zip 10698 android

Zhanglirong-Winnie avatar May 30 '23 03:05 Zhanglirong-Winnie

try use AlignContent="Start"

flipper09112 avatar Oct 03 '23 09:10 flipper09112