Hope this will help some as answer is still not easily found.
ProgressDialog progDialog = ProgressDialog.show( getContext(), null, null, false, true );
progDialog.getWindow().setBackgroundDrawable( new ColorDrawable( Color.TRANSPARENT ) );
progDialog.setContentView( R.layout.progress_bar );
2nd line above will remove the box around the progress Circle icon; but it will stay left aligned by default. You will have to add the third line above to handle gravity and any other style in a XML layout file.
progress_bar.xml
<?xml version="1.0" encoding="utf-8"?>
<ProgressBar
xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
You do not have to define the style above if you like the default smaller circle Icon