/ Android from 0 begin (6)

How to know if a dialog is dismissed in Android?

If the dialog is dismissed,I want to do something for my background.So I want to know if the dialog is dismissed
You can use an `onDismissListener`


public Dialog createDialog() { Dialog d = new Dialog(this); d.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(final DialogInterface arg0) { // do something } }); return d; }

If you are using a DialogFragment just override onDismiss()