-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] Fix incorrect spacing in CollectionView with multiple spans #10624
Conversation
Why is item: 5 higher than other items in first image? Same thing with item: 4 in third image |
@domagojmedo they have incorrect sizes because ItemDecoration in native renderer configured incorrectly. Also adapter need extra notifications when ItemsSource is updated in order to update ItemDecoration correctly |
@ChummerUA do you know if there is an issue for that already? |
@domagojmedo I linked issues that I found into description. There's your issue and another one |
@ChummerUA @PureWeen The API 19 test failures are happening because of a weird thing with the CarouselView's custom adapter; it does some weird things with ItemCount, so the |
@ChummerUA @PureWeen I think I see why this is happening - the I think I see how we can fix this; the SpacingItemDecoration will need to have the SpanSizeLookup item passed in from the ItemsViewRenderer; the SpanSizeLookup. I'll implement that in the morning and see if we can fix this issue. |
@hartez |
@hartez the tests on Android are taking more than 6H .. i m trying to figure if it's related with changes or not, but since it happens on all android environments i have a feeling is related with the changes. |
@rmarinho I ran them locally on a device and they finished in 4 hours, so I don't think it's these changes causing the problem. |
@hartez they keep failing on CI.. |
Fix Carousel tests so they don't take 30 minutes to run;
similar problem #13044 |
we still have problem with this! when we update span count or device orientation the items size(Height) won't update correctly in Griditemlayout |
Description of Change
Fixed incorrect spacing in CollectionView with multiple spans
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
CollectionView doesn't add additional space to some items when layout have multiple spans anymore. Spacing now also updates correctly when ObservableCollection ItemsSource is updated.
Before/After Screenshots
Before
After
![Screenshot_1589013349](https://user-images.githubusercontent.com/12427312/81469378-39ba2a80-91ed-11ea-888b-2a5fefc96a6a.png)
![Screenshot_1589013354](https://user-images.githubusercontent.com/12427312/81469380-3a52c100-91ed-11ea-9aa3-8f14e557f554.png)
![Screenshot_1589013406](https://user-images.githubusercontent.com/12427312/81469383-3a52c100-91ed-11ea-899b-21a4a49c03c2.png)
![Screenshot_1589013417](https://user-images.githubusercontent.com/12427312/81469384-3aeb5780-91ed-11ea-9f22-d41e645825d5.png)
PR Checklist