Android AsyncTasks How to Check If activity is still running

前端 未结 8 1487
时光说笑
时光说笑 2021-02-07 04:25

I have used AsyncTasks with my application, in order to lazy download and update the UI.

For now my AsyncTasks updates the UI real simply:

8条回答
  •  攒了一身酷
    2021-02-07 05:07

    Check whether activity is running or not

     if (!isFinishing()) {
      // Do whatever you want to do
    }
    

提交回复
热议问题