Yes, above two / three lines should be used as follows.
1) You must add this method before to call the setContentView () method.
getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
2) You must add this after calling the setContentView () method.
setProgressBarIndeterminateVisibility(true);
To stop the progress bar
setProgressBarIndeterminateVisibility(false);
,
ParentActivity parent = (ParentActivity)getParent();
parent.setProgressBarIndeterminateVisibility(false);