Android Fragment Framework Animation
Custom Animations
Two Ways To Perform Animations
For a single FragmentTransaction there are two different ways to perform animations. You can use a standard animation or you can supply your own custom animations.
With this new API, you animate Fragments with ObjectAnimator. The standard animations in the framework include:
- enter
- exit
- popEnter
- popExit
For example, you can slide a Fragment in from the left with this code:
fragmentTransaction.setCustomAnimations(R.animator.slide_in_left, 0);
Komentar