Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Views used for CarouselView to Match Parent #21662

Merged
merged 4 commits into from Apr 6, 2024
Merged

Set Views used for CarouselView to Match Parent #21662

merged 4 commits into from Apr 6, 2024

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Apr 5, 2024

Description of Change

This "regressed" from #18856 because the code that was removed was causing an infinite layout loop that would basically cause the resize to happen. My guess is that, at some point in XF the "UpdateContentLayout" code was added to resolve this issue because things weren't remeasuring. So, we added a bunch of measuring/arranging inside the Layout call on ItemContentView to make up for this.

This change modifies the views used for CarouselView so that they are set to match_parent. Setting the layout parameters to match_parent appears to trigger the proper measure/layout path when the orientation/size changes.

I tested this against the original recipes issue as well and it fixed that scenario as well.
I tested various CarV scenarios that we have in our gallery as well to make sure peaking and spacing and things all work alright.

Issues Fixed

Fixes #21609
Fixes #21401

@PureWeen PureWeen requested a review from a team as a code owner April 5, 2024 15:56
mattleibow
mattleibow previously approved these changes Apr 5, 2024
@PureWeen PureWeen changed the title Call NotifyDataSetChanged when CarV dims change Set Views used for CarouselView to Match Parent Apr 5, 2024
mattleibow
mattleibow previously approved these changes Apr 5, 2024
@PureWeen
Copy link
Member Author

PureWeen commented Apr 6, 2024

Failing tests unrelated

@PureWeen PureWeen merged commit ec0deda into main Apr 6, 2024
42 of 47 checks passed
@PureWeen PureWeen deleted the fix_21609 branch April 6, 2024 00:20
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants