开发者

About animation in android widget

开发者 https://www.devze.com 2023-04-08 23:15 出处:网络
I want move widget (such as button) with animation described in XML. But after animation done, that wid开发者_Go百科get return first position.

I want move widget (such as button) with animation described in XML. But after animation done, that wid开发者_Go百科get return first position. How can I stop widget where I want position.


The animation only describes the movement of the widget, and when the animation finishes the widget is redrawn at its original location.

You need to move the widget to the final location immediately before you animate it. Then when the animation is finished the widget new position will be the same as its position at the end of the animation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号