code: public static View blink(View view, int duration, int offset) {
  
          android.view.animation.Animation anim = new AlphaAnimation(0.0f, 1.0f);
          anim.setDuration(duration);
          anim.setStartOffset(offset);
          anim.setRepeatMode(android.view.animation.Animation.REVERSE);
          anim.setRepeatCount(android.view.animation.Animation.INFINITE);
          view.startAnimation(anim);
          return view;
  
      }
docs: Make a View Blink for a desired duration
  
  @param view     view that will be animated
  @param duration for how long in ms will it blink
  @param offset   start offset of the animation
  @return returns the same view with animation properties