Android : Window Manager : Android View Window Leaked
Right after I fix my first problem this one comes up :( please help me fix it.. 03-02 12:47:02.785 9439-9439/com.ucu.ccs.classrecord E/WindowManager﹕ android.view.WindowLea
Solution 1:
This error will happen if your activity has been destroyed but you dialog is still showing. So you have to add these code in your activity's.
onDestroy()
@OverridepublicvoidonDestroy() {
super.onDestroy();
if (dialog != null) {
dialog.dismiss();
dialog = null;
}
}
Hope this works for you.
Solution 2:
You're trying to show a Dialog after you've exited an Activity. In your doInBackground when you are shifting your activity dismiss the dialog before startActivity(i) try this and let me know if it works.
Solution 3:
Actually your activity is getting finished some how, so you need to close dialog.
In onPause() add below code
if(isFinishing()){
if (pDialog!= null) {
pDialog.dismiss();
pDialog= null;
}
}
Post a Comment for "Android : Window Manager : Android View Window Leaked"