傳遞更多的價值如何在doInBackground
在doInBackground的AsyncTask的Android
傳遞更多的價值我AsyncTask
看起來是這樣的。
private class DownloadFile extends AsyncTask<String, Integer, String> {
@Override
protected String doInBackground(String... sUrl) {
{
}
}
是否有可能以某種方式傳遞我的protected String DoInBackground
例如多個值:protected String doInBackground(String... sUrl, String... otherUrl, Context context)
而如何execute
後AsyncTask
? new DownloadFile.execute("","",this)
什麼的?
您可以創建參數化構造函數DownloadFile類,然後在類體中的任何位置使用這些參數。 –