3 回答
TA贡献1827条经验 获得超8个赞
如何确保这些值保持更新?
AsyncTaskinterface
这是否意味着,一旦线程返回,新线程中更新的任何值都将丢失吗?
AsyncTask
interfaceonPostExecute()null
编辑
Activityinterfaceimplements AsyncResponseActivityinterface class
public class MainActivity implements AsyncResponse{Activityvoid processFinish(String output);)
@Override
void processFinish(String output){ // using same params as onPostExecute()
//this you will received result fired from async class of onPostExecute(result) method.
}onPostExecute()delegate.processFinish(result);delegateAsyncResponse
public class AasyncTask extends AsyncTask{public AsyncResponse delegate=null;
@Override
protected void onPostExecute(String result) {
delegate.processFinish(result);
}Interface
TA贡献1817条经验 获得超14个赞
indexworkThread.execute()AsyncResponse
添加回答
举报
