title: how to repeatedly refresh a View (to create an animation)
body: <p>I am trying to do an animation where the clip size changes and thus the size of an drawn bitmap changes, but I want it to look like an animation. Basically, what I did was in the views onDraw() method, i have made code that changes the clip size as necessary and every time it draws the bitmap, the image size is changed.</p>
  
  <p><em><strong>I am confused as to how to call the onDraw method repeatedly on the View with a certain pause in between...lets say 100ms</em></strong></p>
  
  <p>My current code just <strong>creates a runnable on the <em>UI</em> thread</strong> that does this. However, it fails miserably :( I am not sure what to do.</p>
  
  <pre><code>final Handler handler = new Handler();
      Runnable runnable = new Runnable() {
          public void run() {
              DrawnCircle hnd = ((DrawnCircle)AVE.MAIN.findViewById(R.id.drawnCircle1));
              while(hnd.getSweep()&lt;=360){
                  hnd.setSweep(hnd.getSweep()+1);
                  hnd.invalidate();
                  try {Thread.sleep(100);} catch (InterruptedException e) {}
              }
          }
      };
      handler.post(runnable);
  </code></pre>
  
  <p>thank you for your time and effort</p>