When calling progressDialog = ProgressDialog.show(this, null, null, true);
usually the developers wants to only show the progress indication image, and usually
I use the following, it requires no layout file, and puts a centered, borderless blocking progress bar in the middle of the screen.
private ProgressDialog progressDialog;
setUIToWait(true);
...long process...
setUIToWait(false);
private void setUIToWait(boolean wait) {
if (wait) {
progressDialog=ProgressDialog.show(this,null,null);
progressDialog.setContentView(new ProgressBar(this));
} else {
progressDialog.dismiss();
}
}