我想在Android中做一个简单的翻译动画。以下不工作:ViewGroup Animation Not Working
public class MyView extends ViewGroup {
...
TranslateAnimation animation = new TranslateAnimation(0, 0, 0, -500);
animation.setDuration(300);
startAnimation(animation);
...
}
然而,这个工程:
public class MyView extends ViewGroup {
...
animate().setDuration(300).translationYBy(-500);
...
}
我需要的顶级版工作,因为我需要在同一时间进行动画更多的意见正在增加我想在AnimationSet
内使用TranslateAnimation
。
你对ViewPropertyAnimator的意义是不是一次可以做多个动画? –
也许这个答案和视频的链接可以帮助你更好地理解不同的动画API:http://stackoverflow.com/questions/29175429/objectanimator-vs-translateanimation/29187285#29187285 –
我无法找到任何方法ViewPropertyAnimator允许我给出一个视图列表和不同的值,并且一次动画。 – MrGrinst