Java tutorial
//package com.java2s; import android.view.View; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; public class Main { public static void setFlickerAnimation(View v) { final Animation animation = new AlphaAnimation(1, 0); // Change alpha animation.setDuration(500); // duration - half a second animation.setInterpolator(new LinearInterpolator()); // do not alter // animation // rate animation.setRepeatCount(Animation.INFINITE); // Repeat animation // infinitely animation.setRepeatMode(Animation.REVERSE); // v.setAnimation(animation); } }