I have two actions, and I want that when the user touches the button in the first action, the new activity moves to the left and moves to the right, when the first activity does the same, it moves to the right and slides so that it will give an effect in which a new activity pushes the old one to the right and replaces it.
For this, I wrote the following XML:
In animation
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="-100%" android:toXDelta="0" android:duration="1250" /> </set>
Animation
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="0" android:toXDelta="-100%" android:duration="1250" /> </set>
I call the overridePendingTransition(R.anim.anim_in,R.anim.anim_out); function overridePendingTransition(R.anim.anim_in,R.anim.anim_out); in the onCreate method of the new action. As a result of the effect, the new activity moves from left to right correctly, but the first, older activity moves in the opposite direction; he moves to the left. I want to return the direction of movement of this first action. How can I do this, is there an XML property that serves this purpose?
android android-activity animation transition android-animation
Ufuk can bicici
source share