Java tutorial
//package com.java2s; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.widget.Button; public class Main { public static void animaBotao(Button botao) { final Animation animation = new AlphaAnimation(1, 0); // Change alpha from fully visible to invisible animation.setDuration(400); animation.setInterpolator(new LinearInterpolator()); // do not alter animation rate animation.setRepeatCount(2); animation.setRepeatMode(Animation.REVERSE); // Reverse animation at the end so the button will fade back in botao.startAnimation(animation); } }