Refreshing a list w/out freaking out the list with animations

Thread is closed for posting
4 posts, 0 answers
  1. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 31 May 2017 Link to this post

    So the use-case is we need to constantly reload the lists data from a remote source.

    So we have a method that sets the bindable array of items to length = 0, then reload the data.  The problem though is when we set that to 0 it runs the delete animation on all the items in the list http://docs.telerik.com/devtools/nativescript-ui/Controls/NativeScript/ListView/item-animations

    It's such a fast callback ideally I'd just want to see the list blink\update with no animation.

    Suggestions, is there a better way?  I've tried setting visibility on the listview itself but the fadeout happens (or starts) before the list disappears...

  2. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 31 May 2017 in reply to Steve Link to this post

    Okay got it!  Suspend\Resume functions
  3. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 31 May 2017 Link to this post

    Links for others

    http://docs.telerik.com/devtools/nativescript-ui/api/classes/radlistview.html#suspendupdates

    http://docs.telerik.com/devtools/nativescript-ui/api/classes/radlistview.html#resumeupdates

  4. Nikolay Tsonev
    Admin
    Nikolay Tsonev avatar
    340 posts

    Posted 01 Jun 2017 Link to this post

    Hello Steve,

    Thank you for contacting us.

    If I understand you correctly from your very last comment, you have found a solution for your case and you were able to reload the listview data, without the item delete animation to be shown.

    Let me know if I could assist you further or if you need some addition information.

    Regards,
    nikolay.tsonev
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top