title: Xamarin progress dialog not showing as expected
body: <p>On clicking on menu item, I need to update multiple EditText views. Code goes like this. During this process I want to show a progress dialog. </p>
  
  <pre><code> public override bool OnOptionsItemSelected(IMenuItem item)
          {
              switch (item.ItemId)
              {                
                  case Resource.Id.updateid:
                      var progressDialog = ProgressDialog.Show(this, "", "Updating...", true);
                      progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
  
                      new Thread(new ThreadStart(delegate
                      {
                          RunOnUiThread(() =&gt;
                          {
                              for (int i = 0; i &lt; 100; i++)
                              {                                
                                  eTxt[i].Text = slnArray[i].ToString();                               
                              }
                              progressDialog.Dismiss();
                          }
                          );             
                      })).Start();
  
                      return true;
                  default:
                      return base.OnOptionsItemSelected(item);
              }
          }
  </code></pre>
  
  <p>Sometimes the progress dialog appears and sometimes not. Mostly first time it's appearing and it's not appearing followed by. It's hung up second time. </p>
  
  <p>If at all dialog appears it's not spinning and it's looking like some static image.</p>
  
  <p>Question 1) How to make this dialog appear always?</p>
  
  <p>Question 2) How can I make this spinning?</p>
  
  <p>NOTE: I tried keeping progressDialog.Dismiss() inside another RunOnUiThread() and outside the thread also. Both the ways failed.</p>