View not attached to window manager (whats the solution?)

混江龙づ霸主 提交于 2019-12-01 03:58:01
Ronnie

Dismiss the dialog in your onFinish or onDestroy of the launching activity.

Or/And

Don't let your activity handle the orientation changes.

You might find some help in these answers : java.lang.IllegalArgumentException: View not attached to window manager

 @Override
            public void onConfigurationChanged(Configuration newConfig) {
                // TODO Auto-generated method stub
                super.onConfigurationChanged(newConfig);
                YourProgressDialog.dismiss();
            }

and Similarly you can use it on the onFinsh() and OnDestroy() or OnBackPressed() of the activity Depending on the Context of error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!