-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] RefreshView jumps around when refreshing items when ItemSizingStrategy="MeasureAllItems" #12622
Comments
Workaround found for uniform dynamically assigned elements, as outlined in the report at #12697. These are not duplicate reports however - this report details refresh view's behaviour with non-uniform contents. |
@Tommigun1980 I do not have access to https://drive.google.com/file/d/1-ZV5QroF_JvRRw237mA5MeX90_68Hy3y/view?usp=sharing I want to see the glitch you described, could you change the access to that link? |
Hi @jsuarezruiz and thanks for notifying about the permissions problem. I fixed the link for you. Please note that as mentioned the video doesn't seem to be grabbed at 60 fps so the issue is only visible in the pull at 0:08 into the video - in reality it happened on every pull but those frames were unfortunately not captured. In case the effect is not that obvious in the video - what happened is that on every pull the items in the collection view 'jumped' to the highest possible position for a fraction of a second, before jumping back to their correct position where you were 'pulling' the view. This created a very jarring visual artefact. Thank you. |
I was able to find a workaround for this. My hierarchy is as such: If the SECOND StackLayout is set to The issue was never reproducible on an Android or an iOS simulator and only happened randomly on a physical iOS device. If the page containing the RefreshView/CollectionView was opened several times in succession it was rendered correctly maybe 1/3 of the times. With the above workaround it seems to work 100% of the time. So there is some bug in the layout engine, which is only reproducible on a physical iOS device, but not 100% of the time. |
Hi.
I have a CollectionView inside a RefreshView, and when I pull it to refresh the items seem to get an invalid scroll position for a short while, when ItemSizingStrategy="MeasureAllItems". Please see the following video:
https://drive.google.com/file/d/1-ZV5QroF_JvRRw237mA5MeX90_68Hy3y/view?usp=sharing
NOTE: The glitch that is visible at 0:07 into the video happens on every pull, but because the video is apparently not 60fps the glitchy frames is visible only on the last pull in the video, but in real life the issue is very visible and happens on every pull. It looks like the scroll goes to 0 for a fraction of a second on every refresh, and could very well be the exact same bugs as #12555.
So I think this is at least related to (if not the same as) #12555 as the collection view's items also jump around when new items are added with ItemSizingStrategy="MeasureAllItems"?
Note: I would like to use ItemSizingStrategy="MeasureFirstItem", but the elements in there are images where their height is set to their width multiplied by a fixed aspect ratio (converter). This results in them getting an incorrect height with MeasureFirstItem, as apparently MeasureFirstItem is only ever calculated once and I couldn't find a way to refresh it anyhow. So in other words a height that is calculated from its own width forces one to use MeasureAllItems, which then exposes the issues associated with it.
Thanks.
XF 5-pre3, iOS (didn't test on other platforms).
The text was updated successfully, but these errors were encountered: