|
Post by costco on Apr 7, 2021 23:59:33 GMT
Is there an example where a single item is added after the initial bulk population is complete? We'd like to animate a single addition rather than recreating the entire data model. For example append to the head (or tail) of the cells. Or remove from an index of the cells.
Thanks!
|
|
|
Post by echo17 on Apr 8, 2021 12:37:42 GMT
EnhancedScroller virtualizes its cells, meaning that it only has to create cell views for what is visible at the current moment. In order to do that, it needs to know the location and size of all cells that it could possibly display. So whenever you add a data item, delete a data item, or change the size of a cell, the plugin needs to rebuild its size / location cache. That is what the ReloadData method performs.
Note that you can pass an optional parameter to ReloadData to set the scroller's normalized position (0 to 1). You can also use ScrollPosition to set the pixel value, or call JumpToDataIndex if you just want to go to a particular cell. Using these methods in combination with ReloadData can make a seamless experience for the user when reloading.
|
|
|
Post by costco on Apr 8, 2021 17:11:33 GMT
Thank you for the tip! Cheers.
|
|