Skip to content Skip to sidebar Skip to footer

How To Show The SecondaryProgress In A Android ProgressDialog?

I need to show the secondary progress of a ProgressDialog on Android, but it shows only the first progressbar in the dialog. This is the code I use: progress = new ProgressDialog(

Solution 1:

That seems to have no effect if set before the dialog is shown.

Try:

final ProgressDialog progress = new ProgressDialog(this);

progress.setIndeterminate(false);
progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);

progress.setOnShowListener(new OnShowListener() {   

    public void onShow(DialogInterface dialog) {
        progress.setProgress(50);
        progress.setSecondaryProgress(75);
    }
});

progress.show();

EDIT

Progress Dialog with secondary progress


Post a Comment for "How To Show The SecondaryProgress In A Android ProgressDialog?"