Code example for DialogFragment

Methods: dismiss, onResume

0
		}		 
	} 
 
	@Override 
	public void onResume() { 
		super.onResume(); 
		 
		// If the task finished while we were outside of our activity, dismiss ourselves 
		if (mTask == null) {
			dismiss();
		} 
	} 
 
	// DetectAsyncTask callback 
	@Override 
	public void onProgressUpdate(int packagesScanned, int packagesTotal) {
		CharSequence progressText = String.format(getResources().getString(R.string.progress_dialog_text), packagesScanned, packagesTotal);
		mProgressText.setText(progressText);
		mProgressBar.setMax(packagesTotal);
		mProgressBar.setProgress(packagesScanned);
Contextual code suggestions in your IDE  Get Codota for Java