getFragmentManager().beginTransaction().setCustomAnimations(
R.animator.1, R.animator.2,R.animator.3, R.animator.4)
.replace(view1, view2)
.addToBackStack(null)
.commit();
这只会在 view2 上执行动画。我还想同时对 view1 做一些事情。我怎样才能做到这一点?这些 View 是具有动态生成的 id 的 FrameLayouts
最佳答案
引用安卓开发者: FragmentTransaction setCustomAnimations(int enter, int exit, int popEnter, int popExit)
如果我清楚地了解您的需求,要为 1 个 View 使用动画,您必须为退出参数提供动画器
关于android - fragment 事务中 2 个 View 的动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31498549/