I want to execute a code before closing my dialog fragment when touching it outside. Is there a simple way to achieve this?
I tried to override "onDismiss" method, but the DialogFragment is dismissed before writing the log.
@Override
public void onDismiss(DialogInterface dialog) {
Log.d(Constants.TAG,"Dialog will be dismissed");
super.onDismiss(dialog);
}