maui
maui copied to clipboard
[Bug] FlexLayout does not position correctly within parent layout
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

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

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

Reproduction Link
https://github.com/davidortinau/WeatherTwentyOne/blob/main/src/WeatherTwentyOne/Pages/HomePage.xaml
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>

Verified Repro with Android 11 using the smaller repro. Repro project : 2091.zip
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.
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

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