title: Android: ProgressBar in ProgressDialog not Animating
body: <p>I have created one AsyncTask class for fetching data from background (Accessing database).</p>
  
  <p>In <strong>onPreExecute()</strong> method, I create one progress dialog </p>
  
  <pre><code>        try {
              progressDialog = ProgressDialog.show(context, "",
                      "Please wait...", true);
              progressDialog.setIndeterminate(true);
  
          } catch (final Throwable th) {
              // TODO
          }
  </code></pre>
  
  <p>And in onpostExecute()</p>
  
  <pre><code>        protected void onPostExecute(Boolean result) {
  
              pinPoint();
              progressDialog.dismiss();
          }
  </code></pre>
  
  <p>My updated class,</p>
  
  <pre><code>@Override
          protected Boolean doInBackground(Void... params) {
              clust = getPinPointClusters();
              runOnUiThread(new Runnable() {
                  public void run() {
                      plotClusters(clust);
                  }
              });
  
              return true;
          }
  
          @Override
          protected void onPostExecute(Boolean result) {
  
              progressDialog.dismiss();
          }
  </code></pre>
  
  <p>Here pinpoint() method will get some data from server and pin the points in map.
  But The progressBar in ProgressDialog is not animating...
  Please provide me the best way...</p>
  
  <p>Thanks</p>