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

View Cell - Issues

$
0
0

I've been having a hard time getting my ListView to perform correctly.

  1. I have a custom ViewCell with one Image and one Label. If I begin scrolling my list I get bombarded with "Received Memory Warning" on iOS until the app just eventually crashes. One thing I have noticed is that ViewCell's are never reused in iOS's "GetCell" method. Is this the intended behavior? Another thing is that the "OnDisappearing" event of my ViewCell is never fired, making any type of cleanup code to help reduce memory impossible.

  2. Using the built in ImageCell the performance was good enough, this cell seems to be reused in iOS's "GetCell" method and the "OnDisappearing" is called as expected. This would be an ideal option if there was anyway to adjust the ImageView properties which you cant. So in this scenario my UriImageSource images are being sized incorrectly making this cell unusable for me although it performs exactly how I would like.

Is the above mentioned behavior on the ViewCell what is suppose to be happening? If so it would make custom cells useless on anything but very small data sets. This seems really hard to believe. Any kind of custom attempt to reuse cells in a custom ViewCellRenderer makes cells repeat or not even display. I assume "OnDisappearing" is never fired because the cell is never reused or disposed, again is this the intended behavior? Are there any known work arounds for the ViewCell issues?

Any thoughts would be helpful as I have been pulling my hair out trying to find an acceptable solution for something as simple as a cell with a Image and Label.

Thanks!

PS. I am using the latest version of Xamarin.Forms 1.3.1.6296 with the unified framework.
I have also implemented all suggested ListView performance tricks posted at http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/listview/#performance which did not change anything.


Viewing all articles
Browse latest Browse all 58056

Trending Articles