动画:移动的TextView到另一个容器 [英] Animation: Move TextView into another container

查看:112
本文介绍了动画:移动的TextView到另一个容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想移动,在anmiated的方式,一个TextView的LinearLayout中到另一个LinearLayout中。 但是,我不能让它到其容器视图(的LinearLayout这是),它只能移动这里面外移动。有人可以帮助我得到这个工作?另请参见下图:

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:

我使用的NineOldAndroids库,并试图与ViewPropertyAnimator:

I'm using the NineOldAndroids library and have tried with the ViewPropertyAnimator:

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

和还与:

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

相反的?在上面我希望能够找出的LinearLayout我要删除的TextViews中的位置。(如果这是不可能通过陈述视图对象移动到某个视图)。

Instead of the '?' in above I want to be able to find out the position of the LinearLayout I want to drop the TextViews in. (If it's not possible to move to a certain View by stating the View-object).

推荐答案

还有什么需要做的是增加机器人:clipChildren =假给所有的容器布局

What need to be done is to add "android:clipChildren="false"" to all the container layouts.

这篇关于动画:移动的TextView到另一个容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆