Infinite Scrolling with Incremental Data Loading in Xamarin.Forms
ฝัง
- เผยแพร่เมื่อ 5 ม.ค. 2021
- CollectionView has built-in ability to fetch additional data when the user scrolls through the content already loaded. As the data threshold is met, like when only 4 items remain to be displayed, the CollectionView can execute a command to fetch more data and append.
Resources:
* docs.microsoft.com/xamarin/xa...
* Source: github.com/davidortinau/FlyMe
Music: Coffee by Cambo licensed Creative Commons. freemusicarchive.org/music/Ca... - แนวปฏิบัติและการใช้ชีวิต
That's what I was waiting for. Thanks David 👍
Music is dope. You make it seem so easy, comments along the way are spot on. Thanks for posting, VERY helpful.
Very useful for app performance with big data , keep going on David 👍👍
Congrats on 1k subs! 👌
Thanks Matt!
The music is awesome! 👍🏽
Woohoo..! Amazing Video, Seriously my app is Crashing on Android because I have thousands of Movies to load, I hope it will help me in Performance and will save my RAM!
Hi, David! I remember a presentation of yours where u were scrolling up a text into an image and the image was fading out, the further u went up. Can u please make a video on that? Thx in advance! Robert
sure thing, will do. I know what you're referring to.
Great David.
How can I do the same using code behind instead of MVVM ?
These are mostly, if not all, Commands, so you're best-off binding commands to them. However, you can make your code behind the BindingContext and create your commands there just like you would on a ViewModel. In the code behind constructor set "BindingContext = this;".
@@DavidOrtinau
Thanks
Can we change InitData() function in to
private async void InitData()
{
Why you marked LoadMoreAsync method as void instead of Task?
Is it better to use Task instead of void except in some situations like event handlers?
Because I’m being lazy here and I just wanted to show the CollectionView here. For guidance on async/await check out the resources here github.com/brminnick/AsyncAwaitBestPractices and channel9.msdn.com/Shows/On-NET/Brandon-Minnick-asyncawait-best-practices
Would it make a difference in this case? I mean; would it be noticeable, not just measurable?
There is a flaw in this program.. You should mention + instead of *. I think it will multiply the values and take other values..