【发布时间】:2011-02-03 11:06:12
【问题描述】:
我正在使用以下代码创建AsyncTask。
public class SaveFileToExternalStorage extends AsyncTask<File, Void, Boolean>{
protected Boolean doInBackground(File... file) {
DalCategories c= new DalCategories();
boolean result = c.saveObject(customlistobject,file[0]);
return result;
}
protected void onProgressUpdate() {
//setProgressPercent(progress[0]);
}
protected void onPostExecute(boolean result) {
//showDialog("Downloaded " + result + " bytes");
}
}
现在我想向它传递两个参数 customlistobject 和 File 具有 void 进度和 boolean 返回类型的对象。
我不知道如何将 customlistobject 与 File 对象一起传递给我的 AsyncTask。
【问题讨论】: