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
添加回答
舉報