I am very weak with animations in Android. I need to make my Fragments "flip" just 100% equal to the ViewPager
animation.
Here is my slide_in_left.xml
code
<?xml version="1.0" encoding="utf-8"?>
<set>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%"
android:toXDelta="0"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="5000"/>
</set>
Here is my **slide_out_right.xml**
code
<?xml version="1.0" encoding="utf-8"?>
<set>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0"
android:toXDelta="-100%"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="5000"/>
</set>
But this is not equal to ViewPager
sliding animation. Instead, the existing Fragment
exists from left and the new Fragment
enters from left.
Apart from that, I need this animation to exit the existing fragment from left and new one to enter from right. How can I fix this issue?