code: public void onBackPressed(@NonNull DialogPlus dialogPlus) {
      if (onCancelListener != null) {
        onCancelListener.onCancel(DialogPlus.this);
      }
      dismiss();
    }
docs: Invoked when back button is pressed. Automatically dismiss the dialog.