Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Using GetView with numerous item types in ListView

$
0
0

I've got a list view with lots of different item types.

I've implemented GetItemViewType so Xamarin should know what type of view it needs to pass to getView for view reuse.

GetView is often being called with the wrong type of view for reuse. This means that I often have to inflate a new view.

This is compounded by the fact the GetView seems to be called a lot to display the list. For example, the user taps on a cell in the list, an overlay is displayed, the user types some info, and then when returning to list, GetView is called dozens of times, many of which need to inflate a view because the type of view passed in does not correspond to the data. Thus, it can take 6+ seconds to reload the list view.

What are some ways to optimize this?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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