title: How to rotate Image dynamically on its place?
body: <p>I want to rotate image dynamically(Not by XML code). I am using this code to rotate the Image:</p>
  
  <pre><code>public void rotateAnimation(){
      // Create an animation instance
      Animation an = new RotateAnimation(30, 360);
  
      // Set the animation's parameters
      an.setDuration(2000);               // duration in ms
      an.setRepeatCount(0);                // -1 = infinite repeated
      an.setRepeatMode(Animation.REVERSE); // reverses each repeat
      an.setFillAfter(true);               // keep rotation after animation
  
  
      // Aply animation to image view
      scanCircle.setAnimation(an);
  }
  </code></pre>
  
  <p>Using this code, My ImageView get rotate but its not on its position but outside to its position. I want is to rotate it on its own position.</p>
  
  <p>So, How to make it possible ?</p>