title: How to make images blink simultaneously?
body: <p>I have 5 images, I want img1 &amp; img2 to blink simultaneously for 3 sec, then img3 &amp; img4 to blink simultaneously for 3 sec. However, I want img5 to remain static for 3 sec and then the whole process starts from beginning again.</p>
  
  <p>Part of my code :</p>
  
  <pre><code>public class MainActivity extends Activity
  {
  
   ...
      img1=(ImageView) findViewById(R.id.imageView1);
      img2=(ImageView) findViewById(R.id.imageView2);
      img3=(ImageView) findViewById(R.id.imageView3);
      img4=(ImageView) findViewById(R.id.imageView4);
      img5=(ImageView) findViewById(R.id.imageView5);
  
  
      img2.setVisibility(View.GONE);
      img3.setVisibility(View.GONE);
      ....
  
      anim = new AlphaAnimation(0.0f, 1.0f);
      anim.setDuration(500); //You can manage the time of the blink with this parameter
      anim.setStartOffset(30);
      anim.setRepeatMode(Animation.REVERSE);
      anim.setRepeatCount(20);
  
      ...
  
     img1.startAnimation(anim);
  
      AnimationListener animListener = new AnimationListener()
      {
  
          @Override
          public void onAnimationEnd(Animation arg0) {
              // TODO Auto-generated method stub
              img1.setVisibility(View.GONE);
              img2.setVisibility(View.VISIBLE);
              img2.startAnimation(anim2);
          }
  
          @Override
          public void onAnimationRepeat(Animation animation) {
  
          }
  
          @Override
          public void onAnimationStart(Animation animation) {
  
          }
  
      }; 
  }
  </code></pre>