Skip to content

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

4 participants