I trying to use the new android compatibility package to include fragments into my project. I am trying to include a transition animation when I add a new fragment. The thing is only one of my animation work. The In animation works but the Out animation doesn't work. I read somewhere that it is a bug in the compatibility package. But I also read that the bug was fixed in the 3rd revision of the compatibility package. Can anyone help me with this issue
In Animation
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/anticipate_interpolator"
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="100%"
android:toYDelta="0%"
android:duration="1000"/>
Out Animation
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromXDelta="0"
android:toXDelta="0"
android:zAdjustment="top"
android:fromYDelta="0%"
android:toYDelta="100%"
android:duration="1000"/>
This is the code I use to add fragments
newFragment = new HelloWorldFragment();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.bottom_top_animation, R.anim.top_bottom_animation);
ft.add(R.id.outer_layout, newFragment);
ft.addToBackStack(null);
ft.commit();