The best approach is the do the heavy lifting in another thread/AsyncTask. Even if you get a progress bar displayed correctly, you still risk your app being terminated with 'Application Not Responding' if you aren't responsive enough on the UI thread.
That said, the easiest way to display a progress bar would be to make it part of the hosting activity's layout that's gone by default. The first fragment sets it to visible before starting the second fragment. The second fragment, once loaded, finds the progress bar and sets it back to gone.