动画:将 TextView 移动到另一个容器中

2024-03-03

I want to move, in an anmiated way, a TextView in a LinearLayout into another LinearLayout. However, I can't get it to move outside its container view (the LinearLayout it is in), it only moves inside this. Can someone help me to get this done? Also see the following image: textviews and linearlayouts

我正在使用 NineOldAndroids 库并尝试使用 ViewPropertyAnimator:

animate(myTextView).setDuration(500).x(?).y(?);

还有:

animate(myTextView).setDuration(500).translationX(?).translationY(?);

而不是“?”在上面我希望能够找出要放入 TextView 的 LinearLayout 的位置。(如果无法通过声明视图对象移动到某个视图)。


需要做的就是在所有容器布局中添加“android:clipChildren="false"”。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

动画:将 TextView 移动到另一个容器中 的相关文章

随机推荐