0

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!

4

1 回答 1

1
  1. 实现Animation你想要的。
  2. 使用在步骤 1 中创建LayoutAnimationController的动画创建一个。
  3. LayoutAnimationViewGroup的设置为LayoutAnimationController在步骤 2 中创建的。
  4. 在方法中实现Animation.AnimationListener并设置FrameLayout' 的可见性。GONEonAnimationEnd
  5. 将 LayoutAnimationListener 设置为第 4 步中实现的 Listener。
  6. 开始动画startLayoutAnimation
于 2012-02-11T18:45:11.750 回答