Code example for DialogInterface

Methods: cancel

0
    			        finish();
    		        } 
    			}) 
    		.setNegativeButton(R.string.cancel_dialog, new AlertDialog.OnClickListener() {
    			public void onClick(DialogInterface dialog, int which) {
    			        dialog.cancel();
    			} 
    			}) 
    			.create(); 
    		return alertDialog;
    		default: 
    			//@SuppressWarnings("deprecation") 
    			return super.onCreateDialog(id);
    	} 
    } 
     
    public void qdWay(View v) {
    	Log.d(TAG, "Quick&Dirty Way invoked");
    	Dialog dlg = onCreateDialog(DLG_UNSAVED);
    	dlg.show();
Stop searching for code, let great code find you!  Add Codota to your java IDE