0

I am looking to have multiple asynctasks but each one might possible need to be stopped while its running. Whats the most effective way to do this while having limitless running async task?

Right now in my code I would have:

ProgressTask task1; 
ProgressTask task2; 
ProgressTask task3;

but its too messy and difficult to manage that all and if I want to have 50 of those I would have to make 50 of them + code it in my app to determine which one to choose. So how can I do this?

4

1 回答 1

0

http://developer.android.com/reference/android/os/AsyncTask.html通读这个,你的答案就在那里

我个人认为你应该只有一个 Asynctask 然后在 asynctask 中使用多种方法来做你需要的

于 2012-09-23T14:35:44.187 回答