For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, August 30, 2013

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);
}




Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip