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

[iOS] Change how ItemsViewController.CheckEmptySource checks for item size #15289

Merged
merged 3 commits into from
Apr 15, 2022

Conversation

GalaxiaGuy
Copy link
Contributor

Description of Change

This commit

caused the iOS CarouselView native items to have the wrong size under some specific circumstances.

Stepping through , there was an incorrect call to ItemsViewLayout.ConstrainTo(CollectionView.Bounds.Size);. This changes it to use ConstrainToItemsView() instead (which uses the ItemsView size if it has been calculated and CollectionView.Bounds.Size otherwise, which seems to match the existing comment).

Issues Resolved

API Changes

None

Platforms Affected

iOS

Behavioral/Visual Changes

None

Before/After Screenshots

Not applicable

Testing Procedure

Issue 15287 has been added to the app. Scroll up and down the collection view and see that none of the items are incorrectly sized.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jfversluis
Copy link
Member

jfversluis commented Apr 7, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis merged commit d22e7d3 into xamarin:5.0.0 Apr 15, 2022
jfversluis added a commit that referenced this pull request Jun 29, 2022
jfversluis added a commit that referenced this pull request Jun 29, 2022
jfversluis added a commit that referenced this pull request Jul 15, 2022
jfversluis added a commit that referenced this pull request Jul 15, 2022
…for item size" (#15476)

* Revert "[iOS] Change how ItemsViewController.CheckEmptySource checks for item size (#15289)"

This reverts commit d22e7d3.

* Delete Issue15287.xaml.cs
@YevhenVolynets
Copy link

@jfversluis After reverting that issue exists again. I use collection view inside Carousel view. Items have incorrect size. It seems that cell use all of all Carousel View width. I can see only the end of cell. But after when I do "Pull to refresh", I see normal size.
Before Pull to Refresh
image
After Pull to Refresh
image

It was working in 5.0.0.2478 but doesn't work in 5.0.0.2515

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants