Efficient way of using TranslateAnimation to move something across the screen over and over
<p>I've had trouble finding good documentation about animations in Android, but I managed to get my animation working. What I'm concerned about the way I did it is efficiency/performance.</p>

<p>My goal was to have a cloud image move across the screen over and over and repeat forever. To do this I ended up putting 2 identical ImageViews positioned over each other and defining 2 animations:</p>

<p>cloud_slide_exit.xml:</p>

<pre><code>&lt;translate
        android:fromYDelta="0"
        android:toXDelta="-100%p"
        android:duration="25000"
        android:repeatCount="infinite"
        android:repeatMode="restart"
        /&gt;
</code></pre>

<p>cloud_slide_enter.xml:</p>

<pre><code>&lt;translate
        android:fromYDelta="0"
        android:fromXDelta="100%p"
        android:duration="25000"
        android:repeatCount="infinite"
        android:repeatMode="restart"
        /&gt;
</code></pre>

<p>I applied the first animation to "image1" and the second to "image2." The first animation moves "image1" from right (on-screen) to left (off-screen) while the second animation moves "image2" (which starts off screen) from right (off-screen) to left (on-screen). The end result when you view both animations is that the image moves across the screen. When it reaches the left end of the screen it will start coming from the right side of the screen. This is the only way I could think of doing this.</p>

<p>Is there a more efficient way to go about doing this animation? I'd like to find a more efficient way because I actually have 3 clouds moving which means that I have 6 ImageViews/TranslateAnimations.</p>
