Code example for ProgressDialog

Methods: getMaxgetProgressincrementProgressBysetMaxsetMessage

0
	} 
 
	@Override 
	protected void onProgressUpdate(Void... values) {
		super.onProgressUpdate(values);
		progressDialog.setMessage(ArchiveService.getProgressMessage());
		int numberOfEpisodes = ArchiveService.getNumberOfEpisodes();
		if (progressDialog.getMax() != numberOfEpisodes) {
			progressDialog.setMax(numberOfEpisodes);
		} 
		progressDialog.incrementProgressBy(ArchiveService.getProcessedNumbers()
				- progressDialog.getProgress());
 
	} 
 
	@Override 
	protected void onPostExecute(Episode[] result) {
		super.onPostExecute(result);
		progressDialog.dismiss();
		archiveFragment.setListAdapter(new EpisodeAdapter(archiveFragment
				.getActivity(), R.layout.archive_item_row, result,