Code example for AlertDialog

Methods: cancel

0
    @Override 
    protected void onPause() { 
        super.onPause(); 
 
        if (ad != null)
            ad.cancel();
    } 
 
    @Override 
    protected void onDestroy() { 
        super.onDestroy(); 
 
        if (ad != null)
            ad.cancel();
 
    } 
 
}