title: Start and then pause animation in android
body: <p>I have a circular layout and there are "n" buttons in this layout. I start the animation on that layout when the activity starts.</p>
  
  <p>When I click on any button the animation should stop and a dialog appear with the message, "You have clicked this 'XYZ' button".</p>
  
  <p>The code I am using:</p>
  
  <pre><code>    animation = AnimationUtils.loadAnimation(this, R.anim.rotate);
      animation.setFillEnabled(true);
      animation.setFillAfter(true);
      findViewById(R.id.circle_layout).startAnimation(animation);
  </code></pre>
  
  <p>and the animation XML: </p>
  
  <pre><code>&lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
  android:duration="15000"
  android:fromDegrees="0"
  android:pivotX="50%"
  android:pivotY="50%"
  android:repeatCount="infinite"
  android:toDegrees="360" &gt;
  </code></pre>
  
  <p></p>