Ads Inside Post

Search in This Blog

Blink Text in Android

Blink Text in Android




1) create a folder in res named "anim"
under this create a blink.xml file as listed below:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <alpha android:fromAlpha="0.0"
        android:toAlpha="1.0"
        android:interpolator="@

android:anim/accelerate_interpolator"
        android:duration="600"
        android:repeatMode="reverse"
        android:repeatCount="infinite"/>
</set>





in MainActivity

private Animation animBlink;
protected void onCreate(...) {
 textView1 = (TextView) findViewById(R.id.textView1);
 animBlink = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.blink);
 animBlink.setAnimationListener(this);
 textView1.startAnimation(animBlink);
}