Android IllegalArgumentException for dismissDialog

前端 未结 3 1601
别那么骄傲
别那么骄傲 2021-02-15 14:18

I have used following code for download some files from our internet.

public class SplashDownload extends Activity {

    public static final int PROGRESS_DIALOG         


        
3条回答
  •  失恋的感觉
    2021-02-15 14:27

    When you do the

    mProgressDialog.show();
    

    during

    protected Dialog onCreateDialog(int id)
    

    you already set the ID for the Dialog to some random or null value. So when you call to dismiss it, the Application thinks you are crazy.

提交回复
热议问题