Android: move view after animation?

I am trying to basically move the button down to the bottom of the animation screen after clicking it.

I have an animation that works fine, but the button does not stay at the bottom of the screen after the animation ends. I tried to use it offsetTopAndBottom(), but it stays there for only one frame and redraws at the top. How can I get a button to stay?

+5
source share
3 answers

Did you try to invoke setFillAfter(true)animations in your instance?

Hello!

+11
source

Yes it setFillAfter(true)does.

But it is strange that the corresponding android:fillAfterXML attribute does not produce the same effect. Keep in mind guys.

+3

Your button is not available because you use the Preview animation instead of the Property animation . The animation view only changes if you are viewing the View, and not moving it to this place. The animation property does the trick.

I answered your question in another topic. You can check here .

0
source