Android: animate a rectangle
<p>I've scowered the 5 corners of the internet without much of a nibble.</p>

<p>I'm trying to produce a animated rectangle to change its length. when it moves to the next length I want it to animate to the new length..</p>

<p>I'm drawing  the rectangle as follows:</p>

<pre><code>    Paint rectanglePaint = new Paint();
    rectanglePaint.setARGB(255, 0, 0, 255);
    rectanglePaint.setStrokeWidth(2);
    rectanglePaint.setStyle(Style.FILL);

    Rect rectangle = new Rect(1, 1, 200, 20);
    canvas.drawRect(rectangle, rectanglePaint);
</code></pre>

<p>However I'm not sure how to add the ScaleAnimation to the above. I also want to generate through Java code only.</p>

<p>Can anyone help?</p>
