title: Starting and stopping animation
body: <p>I am trying to figure out how on earth i can start and stop animation in my Android App.</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      stopOneButton = (Button) findViewById(R.id.buttonStopOne);
      stopTwoButton = (Button) findViewById(R.id.buttonStopTwo);
      stopThreeButton = (Button) findViewById(R.id.buttonStopThree);
      startButton = (Button) findViewById(R.id.buttonStart);
  
      firstImage = (ImageView) findViewById(R.id.imageView1);
  
      firstImage.setBackgroundResource(R.drawable.spin_animation);
  
      frameAnimation = new AnimationDrawable();
      AnimationDrawable frameAnimation = (AnimationDrawable) firstImage.getBackground();
  //  frameAnimation.start();
  
      firstImage.post(new Starter());
  
      stopOneButton.setOnClickListener(this);
      stopTwoButton.setOnClickListener(this);
      stopThreeButton.setOnClickListener(this);
      startButton.setOnClickListener(this);
  
  }
  
  class Starter implements Runnable {
  
      public void run() {
          frameAnimation.start();
      }
  
  }
  </code></pre>
  
  <p>This is pretty much everything i have, and im starting from scratch without binding any buttons to the functionality, but the image is not spinning around at all.</p>
  
  <p>This is my XML file for the drawable:</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/image1" android:duration="500" /&gt;
      &lt;item android:drawable="@drawable/image2" android:duration="500" /&gt;
      &lt;item android:drawable="@drawable/image3" android:duration="500" /&gt;
      &lt;item android:drawable="@drawable/image4" android:duration="500" /&gt;
   &lt;/animation-list&gt;
  </code></pre>
  
  <p>More code for buttons:</p>
  
  <pre><code>@Override
  public void onClick(View v) {
      switch(v.getId()) {
          case R.id.buttonStopOne:
  
          break;
  
          case R.id.buttonStopTwo:
          break;
  
          case R.id.buttonStopThree:
          break;
  
          case R.id.buttonStart:
              frameAnimation.start();
          break;
      }
  } 
  </code></pre>
  
  <p>Can anyone determine what im doing wrong?</p>