Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Is the ListViewCachingStrategy, RecycleElement, buggy ?

$
0
0

Hi there,

I have been working on a project for long time now with a few persons and among all the features, the user can search for another one through a listing. We are using Xamarin's ListView control and we optimized its performance by setting the ListViewCachingStrategy as RecycleElement. So far everything was working perfectly fine and we improved our timing response by using ElasticSearch on the backend's side.

We were only displaying the users' informations and allowing the connected user to open someone else's page by tapping on the needed cell. The thing is that we recently implemented a new feature allowing him / her to open a second control over the list through a button located itself into the cell. To do so, we set a Command into our UserViewModel initializing everything we need and setting the bool that is binded to this new control's IsVisible property, but when this one is trigger (the Command) we are not into the UserViewModel that is corresponding to the user we wanted.

To be more precise, this issue is only showing up after the first six users (the first ones that are being displayed once the page is appearing) and if we scroll down, the users' informations are being updated correctly so in theory by tapping the button we should trigger the command into the wanted user's ViewModel, right ? Yet, it's not the case since we will always end up into one of the first six UserViewModels...

I have been looking on Google if someone went through the same issue, but none of the results were similar to mine, but I did understand that the RecycleElement is facing some issue on Android. My question is naturally: is it still the case ? If not: did someone face a similar issue ?

Also, our ListView's itemSource is a simple List and not an ObservableCollection as some people may advice to use. Could it lead to such problem ?
I hope that my explanations were clere enough and if you need any details, let me know about it. I really would like to debug this situation...

Thank you in advance to anyone who will read my post and who will take the time to respond to it.
Best regards,

MT WSM


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>