title: add progress bar when one activity loads other activity
body: <p>This is my activity <code>oncreate()</code> method. I set a positive button <code>ok</code> with a dialogue window.
  when I click on it, it navigates UI activity <code>staticDisplay.class</code>. I want to set a progress bar after clicking <code>ok</code> in the dialogue window until it loads the next activity. </p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      Log.d(TAG, "ACTIVITY ONCREATE");
      super.onCreate(savedInstanceState);
      // setContentView(R.layout.dialog);
      setContentView(R.layout.main);
  
      if (Registration.isRunning == false) {
  
          TextView title = new TextView(this);
          title.setText("DM2");
          title.setBackgroundColor(Color.DKGRAY);
          title.setPadding(10, 10, 10, 10);
          title.setGravity(Gravity.CENTER);
          title.setTextColor(Color.WHITE);
          title.setTextSize(20);
          /* alert message */
          AlertDialog.Builder builder = new AlertDialog.Builder(this);
          builder.setCustomTitle(title);
  
          builder.setMessage(R.string.app_description).setPositiveButton(
                  "Ok", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int id) {
                          if (Registration.isRunning == false) {
  
                              startService(new Intent(
                                      getApplicationContext(),
                                      Registration.class));
                          }
                          staticInfo();
                          if (Registration.ruid == null)
                              Registration.ruid = uId;
  
                          startActivity(new Intent(getApplicationContext(),
                                  StatisticDisplay.class));
                      }
                  });
          AlertDialog alert = builder.create();
          alert.show();
      } else {
          startActivity(new Intent(getApplicationContext(),
                  StatisticDisplay.class));
      }
  }
  </code></pre>
  
  <p>StaticDisplay.class on create method</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.statdisplay);
  
  
      usage_btn = (Button) findViewById(R.id.appstat);
      usage_btn.setOnClickListener(this);
      setting_btn = (Button) findViewById(R.id.setting);
      setting_btn.setOnClickListener(this);
  }
  </code></pre>