Code example for DialogFragment

Methods: getActivity, getTag, onCancel

0
			return progressDialog;
		} 
		 
		@Override 
		public void onCancel(DialogInterface dialog) {
			super.onCancel(dialog);
			FragmentActivity activity = getActivity();
			if (activity == null) {
				return; 
			} 
			 
			Fragment fragment = activity.getSupportFragmentManager().findFragmentByTag(TAG_PLUS_CLIENT);
			if (fragment instanceof PlusClientFragment) {
				((PlusClientFragment)fragment).onDialogCanceled(getTag());
			} 
		} 
		 
		@Override 
		public void onDismiss(DialogInterface dialog) {
			super.onDismiss(dialog);
			FragmentActivity activity = getActivity();