Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leaving an Android Animation at it's end state

I'm trying to do an animation that takes a button (with a custom background image and system text) and fades it out. That works fine, actually. The issue is after the animation it goes back to it's initial state. I want it to animate and stay that way.

Thanks!

like image 369
Mike Avatar asked Jan 29 '11 00:01

Mike


1 Answers

AlphaAnimation anim = new AlphaAnimation(1, 0.2f);
anim.setDuration (5000);
textView.startAnimation (anim);
anim.setFillAfter(true);

That should work.

My answer is 'stolen' form android.View transparency

like image 103
Kiril Kirilov Avatar answered Oct 14 '22 20:10

Kiril Kirilov