Rotating image in Imageview overlaps corners
<p>I am using following code </p>

<pre><code>&lt;rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:duration="36000" /&gt;
</code></pre>

<p>and </p>

<pre><code>Animation rotate = AnimationUtils.loadAnimation(this, R.anim.rotate);
findViewById(R.id.yourImageId).startAnimation(rotate);
rotate.reset();
rotate.start();
</code></pre>

<p>The intention was to rotate the image inside the Imageview.</p>

<p>Because this image view has a background colour, this appears to rotate the whole ImageView control and it starts to overlap the text view placed next to it, for example after 45 degree rotation one corner would be overlapping the view placed to left of it </p>

<p>I want to show that the container is not spinning, rather just the image.</p>

<p>I can not remove the background, this will disturb the UI feel in my particular case.</p>

<p>Is it a good idea to place this into a Layout and remove background from this imageview and spin ? or is there a smarter way to it.</p>
