Code example for DialogFragment

Methods: getFragmentManager, onDismiss

0
	private boolean mWorking = false;
 
	public static class DialogFrag extends DialogFragment {
		@Override 
		public void onDismiss(DialogInterface dialog) {
			super.onDismiss(dialog);
 
			FragmentManager fm = getFragmentManager();
			if (fm != null) {
				RetainedFragment frag = (RetainedFragment) fm
						.findFragmentByTag("frag");
				frag.onWorkDone();
			} 
		} 
 
		@Override 
		public Dialog onCreateDialog(Bundle saveInstanceState) {
			ProgressDialog dlg = new ProgressDialog(getActivity());
			dlg.setMessage("Working...");
			dlg.setIndeterminate(true);