I have three activities whose launch modes are single instance.
Using onfling()
, I swing them left and right.
The problem is when I swipe right to left the slide transition is okay but when I swipe left to right, I get the transition of swiping right to left.
I know why this is happening its because I am always sending new intents. But, now I need to change the animation of sliding left to right.
I know there is a method named overridingTransitionPending()
, but I do not know how to define my animation in XML.
Best Answer
Use this xml in
res/anim/
This is for left to right animation:
This is for right to left animation:
In your coding use intent like for left to right:
In your coding use intent like for right to left