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);
}
}