Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Blink Animation in android

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.06k
    Comment on it

    Blink Animation in android

    Here I write code for blinking any components like TextView, ImageView etc.

    Here I just use AlphaAnimation class of Animation .

    TextView textMessageCenter;
    textMessageCenter = (TextView)rootView.findViewById(R.id.text_message_center);
    textMessageCenter.setText("Hello! How are you?")
    
    final Animation animation = new AlphaAnimation(1, 0); // Change alpha from fully visible to invisible
    animation.setDuration(500); // duration - half a second
    animation.setInterpolator(new LinearInterpolator()); // do not alter animation rate
    animation.setRepeatCount(Animation.INFINITE); // Repeat animation infinitely
    animation.setRepeatMode(Animation.REVERSE); // Reverse animation at the end so the textview will fade back in
    textMessageCenter.startAnimation(animation);

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: