title: Animiation Drawable ending
body: <p>I got this animation drawable running, and i want to continue only when it is finished. this code results in overlapping images. </p>
  
  <pre><code>public void onClick(View w) {
          rangen = r.nextInt(4-1)+1;
          frameAnimation.start();
  
          if (rangen==1){
              enemyj.setImageResource(R.drawable.paper);
              restextj.setText("You Lose!");}
          else if (rangen==2){
              enemyj.setImageResource(R.drawable.rock);
              restextj.setText("Draw");}
          else if (rangen==3){
              enemyj.setImageResource(R.drawable.sciss);
              restextj.setText("You Win!");}}
          }
  </code></pre>