On Sun, Jan 27, 2013 at 5:26 PM, dashman <[email protected]> wrote:
> Can an ArrayAdapter (holding data for a ListView) be modified > in a background thread. > > I'd like to modify the array and then call > > adapter.notifyDataSetChanged<http://developer.android.com/reference/android/widget/ArrayAdapter.html#notifyDataSetChanged%28%29> > () > Sure - of course the same multi-threaded concerns of reading and writing the data between different threads apply. Without knowing more about your use case, a better strategy might be to use AsyncTask to do the background op, return the result in the main thread, then copy that over to your adapter. But why not just try it and see? ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- -- 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

