So, I have a bunch of buttons and each one launches an AsyncTask.

So, should I keep a variable like this:

AsyncTask currentTask=null;

Then should I do

if (currentTask != null)  currentTask.cancel();

before I launch the new task?

I only want one task running at a time.  Right now, if someone monkeys
with the buttons, they get a bunch of tasks running simultaneously
with weird UI results.

-- 
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