You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started to notice this bug after updating from 8.0.21 to 8.0.40. Elements within the ItemTemplate's Grid start to overlap
and elements within a VerticalStackLayout don't use all available width when setting ItemSizingStrategy="MeasureFirstItem". @PureWeen is this caused by #22270 ?
In our case, where an item template contains several labels and canvas (which means it is not completely trivial) scrolling performance on Android with MeasureAllItems is utterly not acceptable - laggy and scrolling tends to stop at random points. On the other hand, MeasureFirstItems greatly improves performance, but then the layout is corrupted - some elements are only partially rendered, some disappears, etc.
Not reproducible on iOS. Tested on both 8.0.61 SR6.1 and 9.0.0-preview.5.24307.10.
Just take a look at android trace for initial displaying of collectionview/scrolling (looks quite familiar for both scenario). When I see something like that I am a bit sceptical about the performance. Despite some ordinary setup, every single list item is measured and layouted sequentially. Yea, we all know the concept of UI thread, but then final effect is what matters.
I am also facing this: using MeasureFirstItem, the layout does not render correctly - I can see, ind ebug, and with hotreload, that it appears and then disappears, so :
Excess of layout measures / passes and the last one is making the elements disappear / getting cut.
Using dotnet maui v8.0.91
Basically first item is measured wrong and oversizes to second item. All items after the first are measured the same size. Interacting with the first one (pressing on it invokes BackgroundColor change) leads to remeasuring and correcting the position. So then they are all aligned correctly but all of them (first to last) have some additional space that should not be there.
On iOS this works correctly and background color on pressing fills whole bounds of view.
Hi @Alex-111. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Activity
XamlTest commentedon Apr 12, 2024
Verified on VS 17.10.0 Preview 3.0(8.0.20). Repro on Android 14.0-API34, not repro on iOS 17.2 with below Project:
ReproCollectionViewFirstItem.zip
markusroessler commentedon May 15, 2024
I started to notice this bug after updating from 8.0.21 to 8.0.40. Elements within the ItemTemplate's Grid start to overlap
and elements within a VerticalStackLayout don't use all available width when setting ItemSizingStrategy="MeasureFirstItem". @PureWeen is this caused by #22270 ?
vecalion commentedon May 20, 2024
Experiencing the same issue after updating to 8.0.40.
PeWu09 commentedon Jul 9, 2024
In our case, where an item template contains several labels and canvas (which means it is not completely trivial) scrolling performance on Android with MeasureAllItems is utterly not acceptable - laggy and scrolling tends to stop at random points. On the other hand, MeasureFirstItems greatly improves performance, but then the layout is corrupted - some elements are only partially rendered, some disappears, etc.
Not reproducible on iOS. Tested on both 8.0.61 SR6.1 and 9.0.0-preview.5.24307.10.
Just take a look at android trace for initial displaying of collectionview/scrolling (looks quite familiar for both scenario). When I see something like that I am a bit sceptical about the performance. Despite some ordinary setup, every single list item is measured and layouted sequentially. Yea, we all know the concept of UI thread, but then final effect is what matters.
bcaceiro commentedon Oct 7, 2024
I am also facing this: using MeasureFirstItem, the layout does not render correctly - I can see, ind ebug, and with hotreload, that it appears and then disappears, so :
Using dotnet maui v8.0.91
Domik234 commentedon Oct 17, 2024
I am also facing saming similar.
CollectionView.ItemSizingStrategy: MeasureFirstItem
Only on Android this happens:
https://github.com/user-attachments/assets/8e018a00-744f-49ad-8e60-287ea2cce9da
Basically first item is measured wrong and oversizes to second item. All items after the first are measured the same size. Interacting with the first one (pressing on it invokes BackgroundColor change) leads to remeasuring and correcting the position. So then they are all aligned correctly but all of them (first to last) have some additional space that should not be there.
On iOS this works correctly and background color on pressing fills whole bounds of view.
dotnet-policy-service commentedon Dec 12, 2024
Hi @Alex-111. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.