Rocky
Rocky

Reputation: 1287

Android: when the animation is over

I have made a fromAlpha=1 toAlpha=0 animation to a view, but every time the animation is over the alpha turns to 1.

Is there a way to have the view stay in the last state of the animation?

Upvotes: 0

Views: 756

Answers (2)

Mahdi Hijazi
Mahdi Hijazi

Reputation: 4454

use the XML attribute fillAfter to keep the final state

Upvotes: 4

ania
ania

Reputation: 2350

Animation does not move your view - only draws animation. If you want it to be in the place where animation ends(or save alpha changes) you should set AnimationListener and change your view position(or alpha) in OnAnimationEnd.

Upvotes: 0

Related Questions