views:

48

answers:

0

I've a quite simple list with 3 textview fields on each row. We are updating their values every 2 seconds or so with data coming from a background webservice call ( AsyncTask )

We compare the coming values with the current ones, update them accordingly on the Adapter and finally calling notifyDataSetChanged() if needed

The thing is that the redraw gets really slow thus hanging the whole UI when we got more than 3 update rows at once. Of course we are using all ListView well-known optimizations such as the EfficientAdapter approach ( setTag() and holders ), and getViewTypecount()/getItemViewType() . We have also tried to optimize our interface as much as possible with layoutopt and trying to avoid wrap_content widths and heights to lighten things up .

We don't do expensive operations on our updates either, just standard stuff: changing TextView text, textcolor, and backgroundcolor values.

The only weird thing I can see is that getView() is called 3-4-5 times for each row, although I've read all those Romain's messages [1] telling that is nothing wrong with that

Any ideas or hints on how can we speed it up?

Thank you very much!

[1] http://groups.google.com/group/android-developers/browse_thread/thread/4c4aedde22fe4594/aeb04288064f495e?show_docid=aeb04288064f495e