overridePendingTransition does not work when FLAG_ACTIVITY_REORDER_TO_FRONT is used

Actually the right solution when using REORDER_TO_FRONT is to call overridePendingTransition in the method onNewIntent() of the activity you are going to open.

@Override
protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}

replace with your transitions.

If you need to selectively replace the transition you can add an extra in your intent and check it in the onNewIntent() to decide what to do.

This is not suitable if you don’t know the transition that will be opened (if you don’t specify it explicitly for example) but otherwise is the right solution.

Leave a Comment