maui icon indicating copy to clipboard operation
maui copied to clipboard

[Bug] FlexLayout does not position correctly within parent layout

Open davidortinau opened this issue 4 years ago • 5 comments
trafficstars

Description

The layouts are overlapping, but should not be. Seems FlexLayout doesn't measure correctly or before the next element in the VSL is position (cuz I can't resist guessing for no good reason).

<ScrollView
            Grid.Column="{OnIdiom Phone=0,Default=1}">
            <VerticalStackLayout
                Padding="{OnIdiom Phone='0,50',Default='0,50'}"
                Spacing="{OnIdiom Phone=25,Default=50}">

                <!-- Top widgets -->
                <FlexLayout
                    IsVisible="{OnIdiom Phone=False, Default=True}"
                    AlignItems="Center"
                    AlignContent="Center"
                    JustifyContent="SpaceEvenly">
                    <v:CurrentWidget
                        WidthRequest="200" />
                    <v:WindLiveWidget
                        x:Name="WindWidget"
                        WidthRequest="200" />
                </FlexLayout>
                <v:CurrentWidget
                    IsVisible="{OnIdiom Phone=True, Default=False}"/>

                <BoxView HeightRequest="1" />

                <v:Next24HrWidget />
                <v:Next7DWidget />

            </VerticalStackLayout>
        </ScrollView>

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue: preview.7

Screenshots

Screen Shot 2021-08-13 at 2 59 25 PM

By default I don't show the FlexLayout on iOS:

Simulator Screen Shot - iPhone 12 - 2021-08-13 at 15 05 58

When I do it's the same overlap problem as macOS and I expect other platforms.

Simulator Screen Shot - iPhone 12 - 2021-08-13 at 15 08 44

Reproduction Link

https://github.com/davidortinau/WeatherTwentyOne/blob/main/src/WeatherTwentyOne/Pages/HomePage.xaml

davidortinau avatar Aug 13 '21 20:08 davidortinau

Smaller repro:

<VerticalStackLayout Margin="0">
    <FlexLayout AlignItems="Center">
        <Label Text="1 Inside FlexLayout"/>
        <Label Text="2 Inside FlexLayout"/>
    </FlexLayout>
    <Label Text="1 Outside of FlexLayout"/>
    <Label Text="2 Outside of FlexLayout"/>
</VerticalStackLayout>

image

hartez avatar Nov 05 '21 16:11 hartez

Verified Repro with Android 11 using the smaller repro. Repro project : 2091.zip

kristinx0211 avatar Feb 23 '22 06:02 kristinx0211

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 Aug 30 '22 15:08 ghost

Verified this issue on Visual Studio Enterprise 17.6.0 Preview 2.0. This issue repro on Android emulator(13.0-API 33) with below Project: 2091.zip

image

XamlTest avatar Apr 07 '23 08:04 XamlTest

this bug has been open for 3 years .. still biting Please MS share some love here

bobliwang avatar May 23 '24 11:05 bobliwang