title: Problem specific android question regarding frame by frame animation
body: <p>I'm trying to perform frame by frame animation in android. For this task I created an xml file called "anim.xml" like this:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android"
      android:oneshot="false"&gt; 
      &lt;item android:drawable="@drawable/square0" android:duration="100" /&gt;
      &lt;item android:drawable="@drawable/square1" android:duration="100" /&gt;
      &lt;item android:drawable="@drawable/square2" android:duration="100" /&gt;
      &lt;item android:drawable="@drawable/square3" android:duration="100" /&gt;
      &lt;item android:drawable="@drawable/square4" android:duration="100" /&gt;
      &lt;item android:drawable="@drawable/square5" android:duration="100" /&gt;
      &lt;/animation-list&gt;
  </code></pre>
  
  <p>Then at a frame layout that I have defined, I tried to set it as background and start it at onCreate like this:</p>
  
  <pre><code>    FrameLayout imgView = (FrameLayout)findViewById(R.id.frameLayout1);
      imgView.setBackgroundResource(R.drawable.anim);
      AnimationDrawable anim = (AnimationDrawable) imgView.getBackground();
      anim.start();
  </code></pre>
  
  <p>What I'm experiencing is the first frame only, but what I'm going for is an animation of squares to be on a loop. Do you have any opinions regarding what I have done wrong ?</p>
  
  <p>Cheers.</p>