简体   繁体   English

关于android小部件中的动画

[英]About animation in android widget

I want move widget (such as button) with animation described in XML. 我想用XML描述的动画来移动小部件(例如按钮)。 But after animation done, that widget 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. 然后,当动画结束时,小部件的新位置将与其在动画结尾处的位置相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM