Code example for DialogFragment

Methods: show

0
        neutralButton.setOnClickListener(new View.OnClickListener() {
            @Override 
            public void onClick(View v) {
                EntryEditDialogFragment parent = EntryEditDialogFragment.this;
                DialogFragment confirm = DeleteConfirmationFragment.newInstance(parent);
                confirm.show(getFragmentManager(), "delete_confirm");
            } 
        }); 
 
        updateOkButtonState(); 
    } 
 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        if (which == DialogInterface.BUTTON_POSITIVE) {
            updateBlacklistEntry(); 
        } 
    } 
 
    private void onDeleteConfirmResult(boolean confirmed) {
        if (confirmed) {