Replies: 1 comment 1 reply
-
Could you elaborate a list with all the changes required?. Would love to read more details. cc @hartez |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello mates,
the CollectionView object on the Xamarin platform for iOS is highly unstable when the collection is updated quickly, even when doing state of the art event aggregation before updating, or making sure the main thread is always used, even on the latest releases. When fast scrolling, it may also fails to display a cell completely. Or is unable to correctly compute the cell's height sometimes, especially for grouped header when the collectionview is grouped. An easy repro is when using a DiffUpdate to move, insert or remove rows in a loop. Or clearing then adding some group headers without waiting between each one.
I'm planning to work on this. I have successfully worked on a fully safe collectionview for ios (and android too) before xamarin forms came to life, on the mvvmcross time, a couple of years ago. It featured source update animations for collection view (ie: items moving around when the ObservableCollection is changed).
The main difficulty with change animations is the need to batch the changes in one call with a source object that does not support them (ObservableCollection), and keep both the previous and current items of the collection. But this is also the key to get a 100% stability while keeping the performances.
So to get a fully safe version of the collectionview, i upgraded the ObservableCollection so it gets some batch features. An example of a well-known and simple batch feature is the AddRange method. But you need more for animations.
That means implementing a fully safe collection requires an upgraded ObservableCollection first. This change implies a change in the dotnet framework, so it's more difficult to start.
Do you think it would be worth the try ?
Beta Was this translation helpful? Give feedback.
All reactions