title: How set animation-list as xml attribute
body: <p>Is there a way to set and start an <code>xml</code> <code>animation-list</code> as an <code>xml</code> attribute? I can set and start it programmatically as follows:</p>
  
  <pre><code>    ImageView img = (ImageView) findViewById(R.id.loadingImageView);
      img.setBackgroundResource(R.drawable.loading_animation);
      AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();
      frameAnimation.start();
  </code></pre>
  
  <p>The animation-list is:</p>
  
  <pre><code>&lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android"
  //...
  android:oneshot="false" &gt;
  
  &lt;item
      android:drawable="@drawable/loading_anim_frame_one"
      android:duration="50"/&gt;
   &lt;item
      android:drawable="@drawable/loading_anim_frame_two"
      android:duration="50"/&gt;
  </code></pre>
  
  <p>etcetera.</p>
  
  <p>Is there a way to do this with <code>xml</code> mark-up only, i.e no java code?</p>
  
  <p>If not, is there a way to at least set it as an <code>xml</code> attribute and then start it programmatically?</p>
  
  <p>I can't use rotation of a single drawable since the animation consists of several drawables in sequence.</p>