Progress Dialog crashes in async task

后端 未结 2 1297
走了就别回头了
走了就别回头了 2021-01-26 03:10

As the title says the app crashes when encounters the progress dialog create instruction. The context is passed to async class through constructor.

public class          


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 03:24

    You have to pass Activity context to create dialog as

     Activity context = null;
    
     public URLDataReader(Activity context){
            this.context = context;
      }
    

    Hope this will helps you.

提交回复
热议问题