-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] ListView Group Header Height Doesn't Autosize to Content #8662
Comments
Duplicate of #3769 (comment) Fix proposed in here but not dealt with by XF team yet. PS: It only affects iOS (out of the main 3 platforms). We had no issues getting group headings to properly size on Android or UWP. |
@foehammer88 @nbevans have you tried this with CollectionView? I tried the attached sample and it looks like the group header sizes correctly |
Same issue here (Xamarin.Forms 4.2.0.778463): groupHeader does not auto size on iOS, Android works fine. Also when visibility of the view inside the groupHeader is set to false, the groupHeader still takes up the original space on iOS. |
@PureWeen No I haven't tried CollectionView - but a lot of codebases are still using ListView. |
The following workaround worked for me:
It uses the Layout's OnSizeChanged event, but to allow the StackLayout to properly autosize inside a ViewCell it needs to be wrapped in an outer StackLayout. Also the ListView's HasUnevenRows should be set to true. |
This is STILL a problem. I know that the team's focus is on MAUI, but we were promised quality improvement updates. Come on, this has been open for almost 2 years. |
Still got this crash today in release only, with MAUI and .NET 7. |
Description
ListView Group Header height doesn't autosize to content. Unlike ListView cells and Headers, that auto size their heights to content, ListView Group Headers do not auto size, thus causing manual calculations of label height and sizes to set the height, which introduces bugs on various platforms and device sizes.
Steps to Reproduce
Expected Behavior
ListView Group Headers should auto size to content and not have any adverse visual artifacts.
Actual Behavior
ListView Group Header height stays constant and label/content spills out beneath the Group Header
Basic Information
Screenshots
Reproduction Link
ListViewGroupHeaderHeightIssueProject.zip
The text was updated successfully, but these errors were encountered: