Progress dialog problem in Android

后端 未结 3 537
醉酒成梦
醉酒成梦 2021-01-13 02:37

I want to create a simple ProgressDialog in my Activity. I created it like this:

protected void onCreate(Bundle savedInstanceState) {
    super.         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 03:23

    You can't show the dialog before the activity became visible to the user. Call the showing in onResume() or in some button onClickListener.

提交回复
热议问题