Code example for DialogFragment

0
        public void onClick(DialogInterface dialog, int which) {
            handleOnClick(dialog, which, getActivity(), getArguments());
        } 
    } 
 
    public static class Support extends DialogFragment implements OnClickListener {
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            return createDialog(getActivity(), getArguments(), this);
        } 
 
        @Override 
        public void onClick(DialogInterface dialog, int which) {
            handleOnClick(dialog, which, getActivity(), getArguments());
        } 
    } 
}