android - Blink Animation Count: how to blink a TextView only three times -


how blink textview 3 three times.

i tried code,but doesn't work.

guys have textview need blinking.

anim.setduration(150); anim.setstartoffset(50); anim.setrepeatmode(animation.reverse); anim.setrepeatcount(3);  mainscreenactivity.txtnext.startanimation(anim); blinking=true;  

here xml used blink view

blink.xml

<set xmlns:android="http://schemas.android.com/apk/res/android"     android:shareinterpolator="false">     <alpha         android:fromalpha="1"         android:toalpha="0"         android:repeatcount="3"         android:repeatmode="reverse"         android:interpolator="@android:interpolator/linear"         android:duration="150"         /> </set> 

you can call animation this:

mainscreenactivity.txtnext.startanimation(animationutils.loadanimation(mainscreenactivity, r.anim.blink)) 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -