Open letscodewithkalyan opened 1 month ago
I can't see the code you provided. Could you provide us with a sample project so we can investigate it further? Looking forward to your reply!
Duplicate of #24078
@PureWeen I don't think this is the same issue. This happens without any CollectionView
being involved.
Same issue also happens with FlexLayout
and Grid
in a horizontal ScrollView.
e.g.
<ScrollView BackgroundColor="Blue" HorizontalOptions="Fill" Orientation="Horizontal">
<StackLayout Orientation="Horizontal" BackgroundColor="Green" HorizontalOptions="Fill">
<Label Text="A" BackgroundColor="Aqua" />
<Label Text="B" BackgroundColor="Red" />
</StackLayout>
</ScrollView>
and
<ScrollView BackgroundColor="Blue" HorizontalOptions="Fill" Orientation="Horizontal">
<FlexLayout Direction="Row" BackgroundColor="Green" HorizontalOptions="Fill">
<Label FlexLayout.Basis="100" Text="A" BackgroundColor="Aqua" FlexLayout.Grow="1" />
<Label FlexLayout.Basis="100" Text="B" BackgroundColor="Red" FlexLayout.Grow="1" />
</FlexLayout>
</ScrollView>
This works fine on iOS (both stretch to full width there) but not on Android. (Even setting HorizontalOptions to FillAndExpand doesn't resolve it)
Workaround for now: Set scrollView.Content.MinimumWidthRequest
to scrollView.Width
whenever the size or Content
changes.
@PureWeen @ninachen03 Here is GitHub link for reproduce issue in Maui https://github.com/letscodewithkalyan/MauiStackLayoutIssue
@samhouts @PureWeen Can you check below repo for issue reproduction and reopen the issue and provide any workaround. https://github.com/letscodewithkalyan/MauiStackLayoutIssue
This issue has been verified using Visual Studio 17.12.0 Preview 5 (9.0.0-rc.2.24503.2 & 8.0.92 & 8.0.3). Can repro this issue on android platform. iOS: i Android:
Description
When we add stack layout with horizontal orientation to Scrollview with Horizontal orientation StackLayout horizontal options Fill is not working
Steps to Reproduce
Link to public reproduction project repository
https://github.com/letscodewithkalyan/MauiStackLayoutIssue
Version with bug
9.0.0-rc.2.24503.2
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
Android
Did you find any workaround?
No response
Relevant log output
No response