I'd try it like this:

Initialize the ListView and its adapter in the main thread, then start the async task. The task would post new items to a callback in the main thread (possibly using publishProgress / onProgressUpdate).

The callback would add new items to the underlying data structure (array? in your case) and call notifyDataSetInvalidated to update display.

If data fetching is slow (as you seemed to imply), the overhead of posting new data updates to the main thread shouldn't matter.

-- Kostya

07.09.2010 21:43, Bret Foreman пишет:
I turns out that I misinterpreted my results. The Resource Not Found
error persists, even if the ArrayAdapter is created in the main thread
and then filled in the Async Thread. Anyone have any ideas for other
things to try?



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to