MyNameIs
MyNameIs

Reputation: 852

IllegalArgumentException - WindowManagerGlobal.java

I catch many crashes in crashlitycs, but I dont know - where did these crashes? enter image description here Help please, becouse its big problem for me.

Upvotes: 3

Views: 532

Answers (2)

devops
devops

Reputation: 9179

Look at this sourcecode.

I believe it can happen if you try to close your dialog and his parent activity simultaneous. So the WindowManager tries to remove a view which does not exists any more (already removed).

Look also at this Question: java.lang.IllegalArgumentException: View not attached to window manager

Upvotes: 2

duggu
duggu

Reputation: 38429

Your error occur (As per my opinion or my knowledge) when dismissing progress dialog not checking whether it is showing or not. So you must have to do below:-

if (!Activity.this.isFinishing() && mProgressDialog != null) {
    if(mProgressDialog.isShowing())
    {
        pDialog.dismiss();
    }
}

So you must have to check this to all your activity or fragment.

Upvotes: 2

Related Questions