Code example for DialogFragment

Methods: getDialogonDestroyView, getRetainInstance

0
	 
	@Override 
	public void onDestroyView() 
	{ 
		// http://code.google.com/p/android/issues/detail?id=17423 
		if(getDialog() != null && getRetainInstance()) getDialog().setDismissMessage(null);
		super.onDestroyView(); 
	} 
	 
	 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState)
	{ 
		ContextThemeWrapper context = new ContextThemeWrapper(getActivity(), com.actionbarsherlock.R.style.Theme_Sherlock_Light_Dialog);
		ProgressDialog dialog = new ProgressDialog(context);
		dialog.setMessage("progress");
		dialog.setIndeterminate(true);
		dialog.setCancelable(false);
		return dialog;
	}