title: Android: ProgressDialog doesn't show
body: <p>I'm trying to create a ProgressDialog for an Android-App (just a simple one showing the user that stuff is happening, no buttons or anything) but I can't get it right. I've been through forums and tutorials as well as the Sample-Code that comes with the SDK, but to no avail.</p>
  
  <p>This is what I got:</p>
  
  <pre><code>    btnSubmit.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
          (...)
            ProgressDialog pd = new ProgressDialog(MyApp.this);
            pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            pd.setMessage("Working...");
            pd.setIndeterminate(true);
            pd.setCancelable(false);
  
            // now fetch the results
            (...long time calculations here...)
  
            // remove progress dialog
            pd.dismiss();
  </code></pre>
  
  <p>I've also tried adding <code>pd.show();</code> and messed around with the parameter in <code>new ProgressDialog</code> resulting in nothing at all (except errors that the chosen parameter won't work), meaning: the ProgressDialog won't ever show up. The app just keeps running as if I never added the dialog.</p>
  
  <p>I don't know if I'm creating the dialog at the right place, I moved it around a bit but that, too, didnt't help. Maybe I'm in the wrong context? The above code is inside <code>private ViewGroup _createInputForm()</code> in <code>MyApp</code>.</p>
  
  <p>Any hint is appreciated,</p>