> > It took me the better part of 9 pages to explain it with an example in > the released-but-not-announced Version 2.1 of _The Busy Coder's Guide to > Android Development_. But, it may be I'm just wordy. > > You can grab the source for that from: > > http://commonsware.com/Android/ > > Look for the Threads/Asyncer sample project. > > The canonical example is on the Android Developers blog: > > http://android-developers.blogspot.com/2009/05/painless-threading.html > > Note that the current implementation of AsyncTask limits you to a single > background thread. It is fairly easy to pull the source for it into your > own project and tinker with the java.util.concurrent objects to add > threads, change the queue semantics, etc. > > -- > Mark Murphy (a Commons Guy)
Thanks for the example. I'm not surprised it took 9 pages, I don't think this is trivial to understand. I want to understand this better: > the current implementation of AsyncTask limits you to a single > background thread. Im my case, I've extended a ListActivity. I want to populate the list when it is created and when the user scrolls to the end. I'm using onCreate and onScrollStateChanged. Today I am using a Thread in each of those methods. There is a Handler in the ListActivity class to handle messages from the threads. I can't make the connection on how to do that with an AsyncTask. Is it not a match or am I missing it? Carmen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

