I had this ProgressDialog working fine when my device was in 4.4.4 and I was not working on this app recently and device is upgraded to Lillipop mean while. I am not sure if this has caused anything to this issue but just mentioning.
Question 1. ProgressDialog shows on top left of the screen. See the attached pic. And below is the code. Also how to get transparent background ?
progressDialog = new ProgressDialog(this, android.R.style.Theme_DeviceDefault_Light_Dialog_Alert);
progressDialog.setTitle(title);
progressDialog.setMessage(getResources().getString((R.string.progress_please_wait)));
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.setIndeterminate(true);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.getWindow().setGravity(Gravity.CENTER);
progressDialog.show();
Question 2. I have gone through the material design docs and support docs. I could not find but is there any built in Material Designed ProgressDialog. Or we should depend on the libraries like https://github.com/rahatarmanahmed/CircularProgressView. ?
EDIT :
ClarkXP's answer, in fact more relevant, for another question mentioned below:
Question 3. I tried to use the material-dialogs but my gradle has thrown as error "Failed to resolve: compile com.afollestad:material-dialogs:0.8.5.1".