Code example for DialogFragment

Methods: onDetach, getActivity