There are many ways you can achieve this. I saw you one way.
You can make a Custom Dialog
and load this layout using Inflater
and set layout to your Dialog
. like
LayoutInflater factory = LayoutInflater.from(Activity.this);
View DialogView = factory.inflate(R.layout.custom_progress_layout, null);
Dialog main_dialog = new Dialog(Activity.this,R.style.Theme_Dialog);
main_dialog.setContentView(DialogView);
progressBar=(ProgressBar)DialogView.findViewById(R.id.progressBar1);
main_dialog.setCancelable(false);
main_dialog.setCanceledOnTouchOutside(false);
progressBar.setProgress(0);
progressBar.setMax(100);
main_dialog.show();
and when your progress is completed you dismiss
this dialog using main_dialog.dismiss();
also in this layout you can display progress text and progress by using some TextView
.
Output: