view not attached to window manager error in android

view not attached to window manager error in android

    You will get this kind of error when your view is null, so you have to use try, catch to handle this situation.
Try{
    if(dialog !=null){
        if(dialog isshowing()){
            dialog.dismiss();
        }
    dialog=null;
    }catch(Exception e){
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top