title: Stop progress bar's rotation
body: <p>I'm trying to use rotating progress bar in Android, but there's a problem about rotation. It never stops. I tried <code>clearAnimation()</code> but it doesn't work. I've searched on the internet and mainly suggestions were about changing progress bar's visibility like <code>progressBar.setVisibility(View.INVISIBLE);</code>. But is there a way to actually stop progress bar's rotation without hiding it? My code looks like this.</p>
  
  <pre><code>private class MyAsyncTask extends AsyncTask&lt;String, Void, Document&gt; {
  
          @Override
          protected void onPreExecute() {
              progressBar.animate();
          }
  
          @Override
          protected Document doInBackground(String... params) 
          {
                  //doing some stuff
          }
  
          @Override
          protected void onPostExecute(Document result) 
          {   
                  progressBar.clearAnimation();//doesn't help
                  //doing some stuff
          }
  
          @Override
          protected void onCancelled() {
              super.onCancelled();
          }
  
          @Override
          protected void onCancelled(Document result) {
              super.onCancelled(result);
          }
  
          @Override
          protected void onProgressUpdate(Void... values) {
              super.onProgressUpdate(values);
          }       
      }
  </code></pre>
  
  <p>Any ideas?</p>