Call AsyncTask from another class

后端 未结 4 1373
野性不改
野性不改 2020-12-24 04:17

In an existing app I have an activity with an inner class which extends AsyncTask, this looks like the following:

public class Activity_1 extends BaseActivit         


        
4条回答
  •  孤城傲影
    2020-12-24 04:29

    Its so simple just Simply build an object of main class and than call the inner class like this

     OuterMainClass outer = new OuterMainClass();
           outer.new InnerAsyncClass(param)
             .execute();
    

    this answer is too late to help you but hope it help others.

    Thanks

提交回复
热议问题