Code example for ProgressDialog

Methods: setTitlesetMessagesetProgressStyle, setCancelable, show

0
     * @param message  Message for the progress dialog (or null for none) 
     * @param type  ProgressDialog.x for the type of dialog to be displayed 
     */	 
	static void showProgressDialog(Context context, String title, String message, int type) {
		dismissProgressDialog(); 
		progDialog = new ProgressDialog(context);
		progDialog.setProgressStyle(type);
		if (title != null) {
			progDialog.setTitle(title);
		} 
		if (message != null) {
			progDialog.setMessage(message);
		} 
    	progDialog.setCancelable(false);
    	progDialog.show();
	} 
	 
	 
    /** 
     * Helper to show a non-cancellable spinner progress dialog 
     *