overridePendingTransition only works for enterAnim but not exitAnim when I upgrade my device to Android 13.
My app is using below approach,and Activity B exit animation works in all os version except Android 13.
Activity A -> Activity B -> (FLAG_ACTIVITY_REORDER_TOFRONT) Activity A
Activity B:
Intent intent = new Intent(this, A.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
overridePendingTransition(0, R.anim.push_bottom_out);
Activity A:
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
overridePendingTransition(0, R.anim.push_bottom_out);
}
push_bottom_out.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="0%p"
android:toYDelta="80%p"
android:duration="300"/>
<alpha
android:fromAlpha="1"
android:toAlpha="0.3"
android:duration="300" />
</set>