When calling progressDialog = ProgressDialog.show(this, null, null, true);
usually the developers wants to only show the progress indication image, and usually would it expect to be centered within the window (at least from regular UI design point of view).
But the image is too far left, it seems that some padding/margin on the right hand side is still being calculated in for (optional) text on the right, although we're not passing any text as parameter.
It would just make life little easier for a developer :) So we don't need to create a custom dialog only in order to have the progress indicator being centered by default.
(I filed this as a feature request at http://code.google.com/p/android/issues/detail?id=9697; please star it if you would also like to see this improved).
Now my questions:
How can I easily center the progress image without having to entirely create my own custom alert dialog class? Any parameter I might have overlooked?
Furthermore, how to set the background to transparent?
I'm also wondering about this: https://stackoverflow.com/questions/2866141/how-to-put-custom-animation-into-a-progressdialog I haven't actually tried it myself yet but if you cannot create custom animations, it means if you want a kind of animated progress indicator, you always need to extend the ProgressDialog class? Looking at the ProgressDialog class though, I don't find anything other than regular drawables though (ProgressDialog.java), they're not using AnimatedDrawable there.