I am writing some code to override default enter and exit animations for Activity.
I am using OverridePendingTransition to achieve this task Here I am doing transition from Activity1 to Activity2.
What I want is that, Activity1 should move from right to left and Activity2 should stay appeared behind this without any animation.
How can I achieve that?
Here I have tried putting 0 for entering Animation, but it's not working.
You just need to call the anim functions by moving from Activty1 to Activity2.
Create a res directory name as anim. And put the .xml files in that directory.
Here is the slide_in_right.xml
The slide_out_left.xml anim
And the slide_in_left.xml
Also slide_out_right.xml, keep in mind you can change the animation as your choice by shifting the places of the animation in the code above.