Want to display AlertDialog in onCreate of Activity - android

后端 未结 2 781
暖寄归人
暖寄归人 2021-01-16 18:17

In my activity, I call a MyDialog (custom dialog) in onCreate() and handle its DismissListener in Activity to find if its cancelled or not. If its cancelled, I finish the ac

2条回答
  •  北海茫月
    2021-01-16 18:42

    you're performing your long operations in UI thread. Move them to the AsyncTask's doInBackground method. See the example here.

提交回复
热议问题