title: Animation Not Repeating on Click of Image
body: <p>On Click of a <code>Textview</code> i am doing frame animation using following piece of code</p>
  
  <pre><code>imgclickanimation.setBackgroundResource(R.anim.clickframeanimation);
  ribinclickanimation= (AnimationDrawable) imgclickanimation.getBackground();
  </code></pre>
  
  <p>and on Click of the <code>TextView</code> i am  starting the animation using 
  <code>ribinclickanimation.start();</code></p>
  
  <p><code>clickframeanimation</code> is the anim file.
  and <code>ribinclickanimation</code> is the object of <code>AnimationDrawable</code>
  It works properly for the first time when i click but when i click for the second time onwards  nothing happens can anyone suggest me any help.</p>
  
  <p>*<em>CODE: *</em></p>
  
  <pre><code>package com.example.tryfinal;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.graphics.drawable.AnimationDrawable;
  import android.util.Log;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.ImageView;
  import android.widget.ScrollView;
  import android.widget.TextView;
  
  public class MainActivity extends Activity implements OnClickListener 
  {
      TextView imgclickanimation;
      AnimationDrawable ribinclickanimation;//,ribinanimation;
      int duration=200;
      ScrollView scroll;
      @Override
      public void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          imgclickanimation= (TextView) findViewById(R.id.imgclickanimation);
  
  
  
          imgclickanimation.setOnClickListener(this);
          imgclickanimation.setBackgroundResource(R.anim.clickframeanimation);
          ribinclickanimation= (AnimationDrawable) imgclickanimation.getBackground();
      }
      public void onClick(View arg0) 
      {
          if(arg0.getId()==imgclickanimation.getId())
          {
              imgclickanimation.setBackgroundResource(R.anim.clickframeanimation);
              ribinclickanimation.start();
  
          }
      }
  }
  </code></pre>
  
  <p>and my clickframeanimation.xml is:</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="true"&gt;
      &lt;item android:drawable="@drawable/ribin3" android:duration="200" /&gt;
      &lt;item android:drawable="@drawable/ribin4" android:duration="200" /&gt;
      &lt;item android:drawable="@drawable/ribin3" android:duration="200" /&gt;
  &lt;/animation-list&gt;
  </code></pre>