3 回答
TA贡献1827条经验 获得超8个赞
如何确保这些值保持更新?
AsyncTask
interface
这是否意味着,一旦线程返回,新线程中更新的任何值都将丢失吗?
AsyncTask
interface
onPostExecute()
null
编辑
Activity
interface
implements AsyncResponse
Activity
interface class
public class MainActivity implements AsyncResponse{
Activity
void 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);
delegate
AsyncResponse
public class AasyncTask extends AsyncTask{public AsyncResponse delegate=null; @Override protected void onPostExecute(String result) { delegate.processFinish(result); }
Interface
TA贡献1817条经验 获得超14个赞
index
workThread.execute()
AsyncResponse
添加回答
举报