How to achieve right to left animation to start the activity
Do these modifications to your animation files: enter.xml:
1 2 3 4 5 6 7 8 9 10 11 |
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <translate android:duration="500" android:fromXDelta="100%" android:fromYDelta="0%" android:toXDelta="0%" android:toYDelta="0%" /> </set> |
exit.xml:
1 2 3 4 5 6 7 8 9 10 11 |
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> <translate android:duration="500" android:fromXDelta="0%" android:fromYDelta="0%" android:toXDelta="-100%" android:toYDelta="0%" /> </set> |
You’ll have your second activity sliding in from right to the left. For a better understadnig on how to play around with the fromXDelta and toXDelta values for the animations, here is a very basic illustration on the values: This way you […]