Finish the calling activity when AsyncTask completes

后端 未结 6 1466
挽巷
挽巷 2020-12-16 15:41

My calling activity:

public class Hello extends Activity {  

public void onCreate(Bundle savedInstanceState) {

    MyTask mt = new MyTask(this);
    mt.exe         


        
6条回答
  •  醉梦人生
    2020-12-16 15:54

    Can you try

    this.finish()
    

    Seems like its because of calling it using mContext that it says undefined.

提交回复
热议问题