@Override
 public void onCancel(DialogInterface dialog) {
   super.onCancel(dialog);
   ISimpleDialogCancelListener listener = getCancelListener();
   if (listener != null) {
     listener.onCancelled(mRequestCode);
   }
 }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   final Fragment targetFragment = getTargetFragment();
   if (targetFragment != null) {
     mRequestCode = getTargetRequestCode();
   } else {
     Bundle args = getArguments();
     if (args != null) {
       mRequestCode = args.getInt(BaseDialogBuilder.ARG_REQUEST_CODE, 0);
     }
   }
 }