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 ; }
Make a View Blink for a desired duration