Code example for DialogFragment

Methods: getActivity

0
		mMessage = message;
	} 
 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		final ProgressDialog dialog = new ProgressDialog(getActivity());
	     
	    dialog.setMessage(mMessage);
	    dialog.setIndeterminate(true);
	    dialog.setCancelable(false);
	     
	     
	    return dialog;
	} 
	 
	public static void showLoadingProgress(FragmentManager fragman) {
		dismissLoadingProgress(fragman);
		ProgressDialogFragment loading = new ProgressDialogFragment("Loading...");
		loading.show(fragman, "loading");
	}