    public Dialog onCreateDialog(Bundle savedInstanceState) {
        Object[] confirmationTarget = getArguments().getStringArray(ARG_CONF_ARGUMENTS);
        int resourceId = getArguments().getInt(ARG_CONF_RESOURCE_ID, -1);
        int posBtn = getArguments().getInt(ARG_POSITIVE_BTN_RES, -1);
        int neuBtn = getArguments().getInt(ARG_NEUTRAL_BTN_RES, -1);
        int negBtn = getArguments().getInt(ARG_NEGATIVE_BTN_RES, -1);
        if (confirmationTarget == null || resourceId == -1) {
            Log.wtf(getTag(), "Calling confirmation dialog without resource or arguments");
            return null;
        }
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
            .setIcon(android.R.drawable.ic_dialog_alert)
            .setMessage(String.format(getString(resourceId), confirmationTarget))
            .setIconAttribute(android.R.attr.alertDialogIcon)
            .setTitle(android.R.string.dialog_alert_title);
        if (posBtn != -1)
            builder.setPositiveButton(posBtn,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            mListener.onConfirmation(getTag()); 
                        }
                    });
        if (neuBtn != -1)
            builder.setNeutralButton(neuBtn,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            mListener.onNeutral(getTag()); 
                        }
                    });
        if (negBtn != -1)
            builder.setNegativeButton(negBtn,
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            mListener.onCancel(getTag());
                        }
                    });
      return builder.create();
    }

    public Dialog onCreateDialog(Bundle savedInstanceState) {
        Object[] confirmationTarget = getArguments().getStringArray(ARG_CONF_ARGUMENTS);
        int resourceId = getArguments().getInt(ARG_CONF_RESOURCE_ID, -1);
        int posBtn = getArguments().getInt(ARG_POSITIVE_BTN_RES, -1);
        int neuBtn = getArguments().getInt(ARG_NEUTRAL_BTN_RES, -1);
        int negBtn = getArguments().getInt(ARG_NEGATIVE_BTN_RES, -1);
        if (confirmationTarget == null || resourceId == -1) {
            Log.wtf(getTag(), "Calling confirmation dialog without resource or arguments");
            return null;
        }
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
            .setIcon(android.R.drawable.ic_dialog_alert)
            .setMessage(String.format(getString(resourceId), confirmationTarget))
            .setTitle(android.R.string.dialog_alert_title);
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
            builder.setIconAttribute(android.R.attr.alertDialogIcon);
        }
        if (posBtn != -1)
            builder.setPositiveButton(posBtn,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            mListener.onConfirmation(getTag()); 
                        }
                    });
        if (neuBtn != -1)
            builder.setNeutralButton(neuBtn,
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            mListener.onNeutral(getTag()); 
                        }
                    });
        if (negBtn != -1)
            builder.setNegativeButton(negBtn,
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            mListener.onCancel(getTag());
                        }
                    });
      return builder.create();
    }
