Disclaimer: @iagreen's answer still remains true - to get a layout similar to that in the uninstall process, the best option is to just use it in the layout, rather than relying on the window functions)
But you were on the right track with the Windows features, you just mixed two of them.
See this:
setProgressBarIndeterminate(true);
requires the progress bar [horizontal] to be undefined. And this:
setProgressBarIndeterminateVisibility(true);
shows a window of an indefinite progress bar - a thing is a completely different kind.
To clarify the situation, you will get a horizontal indefinite progress bar shown at the top of the window
requestWindowFeature(Window.FEATURE_PROGRESS); setProgressBarIndeterminate(true); setProgressBarVisibility(true);
and this will give you a progress bar in the action bar
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setProgressBarIndeterminateVisibility(true);
source share