Ejemplo n.º 1
0
  public static ConfirmationDialogFragment newInstance(
      int dialogId, String title, String message, String confirmText, String cancelText) {
    ConfirmationDialogFragment fragment = new ConfirmationDialogFragment();

    Bundle args = new Bundle();
    args.putInt(ARG_DIALOG_ID, dialogId);
    args.putString(ARG_TITLE, title);
    args.putString(ARG_MESSAGE, message);
    args.putString(ARG_CONFIRM_TEXT, confirmText);
    args.putString(ARG_CANCEL_TEXT, cancelText);
    fragment.setArguments(args);

    return fragment;
  }