Does anyone know or can give an example how this fragment animation is done when removing a fragments framelayout container so when the container is set to GONE, it just doesnt disapere but instead animates? ie. slide left Thnx!
1166 次
1 回答
1
- 实现
Animation你想要的。 - 使用在步骤 1 中创建
LayoutAnimationController的动画创建一个。 - 将
LayoutAnimation您ViewGroup的设置为LayoutAnimationController在步骤 2 中创建的。 - 在方法中实现
Animation.AnimationListener并设置FrameLayout' 的可见性。GONEonAnimationEnd - 将 LayoutAnimationListener 设置为第 4 步中实现的 Listener。
- 开始动画
startLayoutAnimation
于 2012-02-11T18:45:11.750 回答