【发布时间】:2020-09-01 17:09:13
【问题描述】:
我希望我的 RelativeLayout 以从左到右和从右到左两个方向展开
我进行了几项研究,并得到了使用 ValueAnimator 从左到右传播动画的答案。
ValueAnimator.ofInt(0, width);
但是当我反转它时,它就会消失。它的工作原理与
ValueAnimator.ofInt(width,0);
我已经尝试过 .reverse() 函数。但这不是解决方案。
对从右到左的动画有什么想法吗?或者我是否必须使用其他带有 xml 的解决方案。 但我想尽可能多地使用动态方式。
编辑: 我做了更多的研究并找到了一些方法。
Increase Android button's width from right to left
这正是我想要的工作。但这是 ViewGroup 上的东西...
【问题讨论】:
标签: android android-animation android-relativelayout