Q:

Putting the main screen in the background whilst loading?

I'm using a AsynTask and when I go into the processing, which is fetching some info off a webserver I want to display a loading dialogue. Currently I have a Progress spinner which I make visible on onPreExecute but I wanted to put the rest of the UI out of focus whilst it does this. 
What is the correct way to do this, should I be using a pop-up type of dialogue instead of just a progress bar? 

A:

...but I wanted to put the rest of the UI out of focus whilst it does this.

I have a good idea here why don't blur the window of your app to have the effect you need
      WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();  
      lp.dimAmount = 0.0f;  
      dialog.getWindow().setAttributes(lp);  
      dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND)

How to blur/dim an activity

or by using ProgressDialog example of using ProgressDialog:
      ProgressDialog pd = new ProgressDialog(MyApp.this);
      pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
      pd.setMessage("Working...");
      pd.setIndeterminate(true);
      pd.setCancelable(false);

