title: How to show ProgressDialog across launching a new Activity?
body: <p>Goal: Have a ProgressDialog which shows "Loading..." until next Activity is completely loaded and shown on screen.</p>
  
  <p>Tried with ProgressDialog context and activity set to originating Activity. Also tried with getApplicationContext() and getParentContext(). Exceptions on the last two approaches. Need to do this as destination Activity is slow to render due to non-simple Layout file. (Cannot fix that right now due to organizational issues.) Turns out the destination Activity takes 1-2 seconds to OnCreate and then screen goes black for up to 5+ seconds then it paints. The rendering is just slow. Did review with Hierarchy Viewer and see lots of red balls but can't fix now.</p>
  
  <p>Read up on some related but haven't found a fix. E.g. <a href="https://stackoverflow.com/questions/1026973/android-whats-the-difference-between-the-various-methods-to-get-a-context">What&#39;s the difference between the various methods to get a Context?</a></p>
  
  <p>E.g. both of these crash. Using the "this" of source Activity doesn't work either.</p>
  
  <pre><code>// Context parentContext = this.getParent().getBaseContext();    
  Context parentContext = this.getApplicationContext();
  ProgressDialogMenuable theProgressDialog = new ProgressDialogMenuable(parentContext,this);
  theProgressDialog.setTitle("yeeha");
  theProgressDialog.setMessage("weewah");
  theProgressDialog.setIndeterminate(true);
  theProgressDialog.setCancelable(true);
  theProgressDialog.show();
  </code></pre>
  
  <p>Also, oddly, nothing happens when I do this:
                              theProgressDialog.show();
                              ActivityHelper.changeActivity(this, v, InsMyHoldingsActivity.class, extraMap, -1, -1);
  User clicks button to show next activity but the ProgressDialog conflicts with the Activity launch and nothing actually happens other than the button becoming yellow ontouch. Button below works. removing ProgressDialog creation and it works. No console messages logged. A little offputting to the developer for sure.</p>