kakajika / FragmentAnimations
- среда, 27 апреля 2016 г. в 03:11:53
Java
Animation for support-v4 Fragment transition.
Animation examples for support.v4.Fragment
transition.
These animations do not depends on any external libraries.
In your Fragment
, just code like this.
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
return CubeAnimation.create(CubeAnimation.UP, enter, DURATION);
}
See more example in ExampleFragment.java
You can use above Animations with another one.
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
if (enter) {
return MoveAnimation.create(MoveAnimation.UP, enter, DURATION);
} else {
return CubeAnimation.create(CubeAnimation.UP, enter, DURATION);
}
}