This is a migrated thread and some comments may be shown as answers.

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

3 Answers 90 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 31 May 2017, 06:39 PM

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...

3 Answers, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 31 May 2017, 07:27 PM
Okay got it!  Suspend\Resume functions
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 31 May 2017, 07:28 PM

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

0
Nikolay Tsonev
Telerik team
answered on 01 Jun 2017, 05:41 AM
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.
Tags
ListView
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Nikolay Tsonev
Telerik team
Share this question
or