I want to start a new activity with a custom translate animation, so I use overridePendingTransition with my animation in xml.
overridePendingTransition(R.anim.enter_from_right, R.anim.exit_to_left)
enter_from_right.xml:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="350" />
Is there any way to modify/create an animation programmatically for an activity transition? In this case, modify fromXDelta with an specific value dynamically