Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] iOS - CollectionView MeasureAll fails with a heterogeneous item source #12626

Closed
WanftMoon opened this issue Oct 27, 2020 · 8 comments
Closed
Labels

Comments

@WanftMoon
Copy link

Description

When setting the ItemsSource of a CollectionView with an heterogeneous list (int, datetime and string for example), CollectionView Fails on iOS to MeasureAllItems and resize the cell accordingly.
Screen Shot 2020-10-27 at 10 27 11

Steps to Reproduce

  1. Create a collectionView with the SizingStrategy MeasureAllItems and set the ItemsSource to a list like below:
    <x:Array Type="{x:Type x:Object}"> <sys:DateTime>2001-12-01</sys:DateTime> <sys:DateTime>2006-06-21</sys:DateTime> <sys:Int32>98</sys:Int32> <sys:String>Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon Baboon</sys:String> <sys:String>Goodbye</sys:String> <sys:Int32>98</sys:Int32> <sys:String>Baboon </sys:String> <sys:Int32>98</sys:Int32> </x:Array>

  2. Set the datatemplate
    <DataTemplate> <Label Text="{Binding .}" /> </DataTemplate>

  3. Run it on iOS and Android.

Expected Behavior

The item to be of the correct size

Actual Behavior

On Android, the it behaves correct.
On iOS, the list will keep the height of the greater item, after it is rendered

Screenshot_1603804947
Simulator Screen Shot - iPhone 8 - 2020-10-27 at 10 31 56

Basic Information

  • Version with issue: XF 4.8.0.1560
  • Last known good version: NA
  • IDE: Visual Studio For mac
  • Platform Target Frameworks:
    • iOS: 14.1
    • Android: 9.0
  • Nuget Packages:

Screen Shot 2020-10-27 at 10 33 56

  • Affected Devices: iOS

Screenshots

Screenshot_1603804947
Simulator Screen Shot - iPhone 8 - 2020-10-27 at 10 31 56

Reproduction Link

CollectionViewMeasureAll.zip

Workaround

Don't use heterogeneous item source for now

@WanftMoon WanftMoon added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 27, 2020
@PureWeen
Copy link
Contributor

PureWeen commented Oct 27, 2020

Duplicate #11011

@WanftMoon

This comment has been minimized.

@WanftMoon
Copy link
Author

@PureWeen @samhouts
Can you link the duplicate issue?

@PureWeen

This comment has been minimized.

@WanftMoon

This comment has been minimized.

@WanftMoon

This comment has been minimized.

@PureWeen
Copy link
Contributor

Apologies @WanftMoon I meant to link
#11011

There are a number of issues logged against MeasureAll

#12622
#11511

So just trying to consolidate

@WanftMoon
Copy link
Author

ty, will follow those issues!

best regards.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants