When calling progressDialog = ProgressDialog.show(this, null, null, true); usually the developers wants to only show the progress indication image, and usually
progressDialog = ProgressDialog.show(this, null, null, true);
If you want to display indeterminate progress bar only.
ProgressDialog progressDialog = ProgressDialog.show(this, null, null, true, false); progressDialog.setContentView(R.layout.progress_layout);
And create a layout xml file with name "progress_layout.xml"