title: Android Activity.startActivity() and Dialog.show() order
body: <p>I need to show a EULA like dialog when a user starts up my app, but my app also has a splash screen of sorts that needs to be displayed before the dialog. I coded this up like so:</p>
  
  <pre><code>Activity A.onCreate(...) {
  ...
  1. startActivity(Activity B) [this activity calls .finish() after x seconds]
  2. dialog.show()
  ...
  }
  </code></pre>
  
  <p>Logically, it seems like this should work. However, after I return to activity A from activity B, the entire screen is dimmed as if the dialog is showing, but without the dialog window.</p>
  
  <p>I was able to work around this by reversing the calls as such and the dialog shows after activity B is done and no weird issues occur:</p>
  
  <pre><code>Activity A.onCreate(...) {
  ...
  1. dialog.show()
  2. startActivity(Activity B) [this activity calls .finish() after x seconds]
  ...
  }
  </code></pre>
  
  <p>Anyone know why the order of calls is so important? To me they should work the same.</p>