Code example for DialogFragment

Methods: onDestroy

0
        } 
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        mOnDeleteListener = null;
    } 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
 
        return new AlertDialog.Builder(getActivity()).setIcon(R.drawable.ic_launcher)
                .setTitle(mTitle).setPositiveButton(R.string.delete, this).setMessage(mMessage)
                .setNegativeButton(android.R.string.cancel, this).setCancelable(true).create();
    } 
 
    public void registerOnDeleteListener(OnDeleteListener listener) {
        mOnDeleteListener = listener;
    }