Code example for ProgressDialog

Methods: incrementProgressBysetProgress, dismiss, isShowing, show

0
            public void onProgressChanged(WebView view, int progress)
            { 
            	// Activities and WebViews measure progress with different scales. 
				// The progress meter will automatically disappear when we reach 100% 
				//activity.setProgress(progress * 1000); 
				progressDialog.show();
				activity.setProgress(progress * 1000);
				coconutRef.setProgress(progress * 1000);
				progressDialog.setProgress(progress * 1000);
				progressDialog.incrementProgressBy(progress);
				Log.d(TAG, "Progress: " + progress);
 
				if(progress == 100 && progressDialog.isShowing()) {
					Log.d(TAG, "Progress: DONE! " + progress);
					 // Stop clock and calculate time elapsed 
			        //stopwatchFinish(); 
					progressDialog.dismiss();
				} 
            } 
 
			public void stopwatchFinish() { 
				Calendar cal2 = new GregorianCalendar();