title: Animation delay android
body: <p>I have three <code>buttons</code>, and i want them to randomly change color once I click the "Start" button. My problem is that I can't get the animations to show one after another and they end up running on top of each other.</p>
  
  <p>I know that I have to use <code>animationListiner()</code> but I don't fully understand it and can't get it to work. </p>
  
  <pre><code>private void startColorAnimation(View v) {
  for(int i =0; i&lt;10;i++) {
              final int min = 0;
              final int max = 2;
              final int random = rnd.nextInt((max - min) + 1) + min;
  
              if(random == 0){
                  animStart = 0xFFFF0000;
                  animEnd = 0xFF990000;
                  colorAnim = ObjectAnimator.ofInt(redButton, "backgroundColor", animStart, animEnd );
              }else if(random ==1){
                  animStart = 0xFF3366FF;
                  animEnd = 0xFF000099;
                  colorAnim = ObjectAnimator.ofInt(blueButton, "backgroundColor", animStart, animEnd );
              }else if(random==2){
                  animStart = 0xFF009900;
                  animEnd = 0xFF66CC00;
                  colorAnim = ObjectAnimator.ofInt(greenButton, "backgroundColor", animStart, animEnd );
              }
              colorAnim.setDuration(500);
              colorAnim.setEvaluator(new ArgbEvaluator());
              colorAnim.setRepeatCount(0);
              colorAnim.start();
          }
      }
  </code></pre>
  
  <p>Any kind of help would be appreciated. </p>