title: How to animate the drawing of arc in android
body: <p>I am new to Android and I am using the drawArc function to show the progress of some task to the user but now I want to animate this so that it looks as if it is growing.</p>
  
  <p>I use the following code but not working:</p>
  
  <pre><code>   new Thread(new Runnable() {
      int i=0;
      float startAngle =0;
      float swipeAngle = 40.7f;
      public void run() {
          while (i &lt; swipeAngle) {
              canvas.drawArc(rectF, startAngle, i, false, paint);
  
              try {
                  Thread.sleep(50);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
          i++;
      }
  }).start();
  </code></pre>
  
  <p>Can Someone Please suggest whats wrong in this or Can suggest some other idea to animate.</p>