Skip to content

[Android] CollectionView with ItemSizingStrategy="MeasureFirstItem" Does Not Work as Expected for HorizontalList and HorizontalGrid Layouts #29192

@NafeelaNazhir

Description

@NafeelaNazhir

Description

When using a CollectionView with ItemSizingStrategy="MeasureFirstItem" in HorizontalList or HorizontalGrid layouts, the sizing behavior does not work as expected. Items are not sized consistently based on the first item, leading to layout issues .

Screen.Recording.2025-04-25.at.12.20.52.PM.mov

Steps to Reproduce

  1. Run the attached sample ItemSizingStrategySample 2.zip
  2. Set ItemSizingStrategy as MeasureFirstItem for Horizontal List.
  3. Observe the layout, items are not sized uniformly, and their widths vary based on their content.
  4. Observe the behavior for Horizontal Grid also.

Expected Behavior: The CollectionView should size all items consistently based on the size of the first item in the collection

Actual Behavior: In HorizontalList and Horizontal Grid layout, items are not sized uniformly, and their widths vary based on their content.

Link to public reproduction project repository

No response

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions