private void instantiateAndShowProgressDialog(GeekIncRssListActivity activity, int progress) { if (listData.getDialog() != null) { listData.getDialog().dismiss(); } ProgressDialog dialog = new ProgressDialog(activity); dialog.setCancelable(true); dialog.setMessage("Chargement..."); // set the progress to be horizontal dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); // reset the bar to the default value of 0 dialog.setProgress(progress); dialog.setMax(100); dialog.show(); listData.setDialog(dialog); }
public void setDialog(ProgressDialog dialog) { listData.setDialog(dialog); }