Android TextBlink
<p>How do I make a <strong>Textblink</strong> like <em>fade-in</em> and <em>fade-out</em> in an Android application?
I implemented animation but it's not working.</p>

<p>Could anyone help me?</p>

<pre><code>package  textopar.android.com;
import  android.content.Context;
import  android.view.animation.Animation;
import  android.view.animation.AnimationUtils;
import  android.view.animation.Animation.AnimationListener;
import  android.widget.TextView;

public  class  {TextoParpadeante
    Context context;
    private  TextView text = null ;
    private  Animation fadeIn = null ;
    private  Animation fadeOut = null ;
    // Listeners to detect the end of the animation

    private  LocalFadeInAnimationListener myFadeInAnimationListener = new    LocalFadeInAnimationListener ();
    private  LocalFadeOutAnimationListener myFadeOutAnimationListener = new  LocalFadeOutAnimationListener ();

    /**
    * Constructor of the class
    * @ Param context Context
    * @ Param text TextView
    */

    public TextoParpadeante (Context context, TextView text) {
        this . context = context;
        this . text = (TextView) text;
        runAnimations ();
    }

    private  void  launchOutAnimation () {
        texto.startAnimation (fadeOut);
    }

    /**
    * Performs the actual fade-in
    */
    private  void  launchInAnimation () {
        texto.startAnimation (fadeIn);
    }

    /**
    * Start the animation
    */
    private  void  runAnimations () {
        // Use of animations
        AnimationUtils.loadAnimation fadeIn = ( this . context, R.anim.fadein);
        fadeIn.setAnimationListener (myFadeInAnimationListener);
        AnimationUtils.loadAnimation fadeOut = ( this . context, R.anim.fadeout);
        fadeOut.setAnimationListener (myFadeOutAnimationListener);
        // And start
        launchInAnimation ();
    }

    // Runnable to start the animation
    private  mLaunchFadeOutAnimation Runnable = new  Runnable () {
        public  void  run () {
            launchOutAnimation ();
        }
    };

    private  mLaunchFadeInAnimation Runnable = new  Runnable () {
        public  void  run () {
            launchInAnimation ();
        }
    };

    /**
    * Listener for the fadeout animation
    *
    * @ Author moi
    *
    */
    private  class  LocalFadeInAnimationListener implements  AnimationListener {
        public  void  onAnimationEnd (Animation animation) {
            texto.post (mLaunchFadeOutAnimation);
        }
        public  void  onAnimationRepeat (Animation animation) {
        }
        public  void  onAnimationStart (Animation animation) {
        }
    };

    /**
    * Listener for fadeIn animation
    */
    private  class  LocalFadeOutAnimationListener implements  AnimationListener {
        public  void  onAnimationEnd (Animation animation) {
            texto.post (mLaunchFadeInAnimation);
        }
        public  void  onAnimationRepeat (Animation animation) {
        }
        public  void  onAnimationStart (Animation animation) {
        }
    };
}
</code></pre>
