navigation/common/src/main/java/androidx/navigation/NavOptions.java
public static void applyPopAnimationsToPendingTransition(@NonNull Activity activity) {
        Intent intent = activity.getIntent();
        if (intent == null) {
            return;
        }
        Bundle bundle = intent.getBundleExtra(KEY_NAV_OPTIONS);
        if (bundle != null) {
            NavOptions navOptions = NavOptions.fromBundle(bundle);
            int popEnterAnim = navOptions.getPopEnterAnim();
            int popExitAnim = navOptions.getPopExitAnim();
            if (popEnterAnim != -1 || popExitAnim != -1) {
                popEnterAnim = popEnterAnim != -1 ? popEnterAnim : 0;
                popExitAnim = popExitAnim != -1 ? popExitAnim : 0;
                activity.overridePendingTransition(popEnterAnim, popExitAnim);
            }
        }
    }
/**
     * Apply any pop animations in the Intent of the given Activity to a pending transition.
     * This should be used in place of  {@link Activity#overridePendingTransition(int, int)}
     * to get the appropriate pop animations.
     * @param activity An activity started from the {@link ActivityNavigator}.
     * @see #addPopAnimationsToIntent(Intent, NavOptions)
     * @see #getPopEnterAnim()
     * @see #getPopExitAnim()
     */
Apply any pop animations in the Intent of the given Activity to a pending transition.
This should be used in place of   Activity#overridePendingTransition(int, int)
to get the appropriate pop animations.
@param activity An activity started from the  ActivityNavigator.
Apply any pop animations in the Intent of the given Activity to a pending transition . This should be used in place of Activity#overridePendingTransition ( int int ) to get the appropriate pop animations . @param activity An activity started from the ActivityNavigator .
public static void applyPopAnimationsToPendingTransition(@NonNull Activity activity) {
        Intent intent = activity.getIntent();
        if (intent == null) {
            return;
        }
        Bundle bundle = intent.getBundleExtra(KEY_NAV_OPTIONS);
        if (bundle != null) {
            NavOptions navOptions = NavOptions.fromBundle(bundle);
            int popEnterAnim = navOptions.getPopEnterAnim();
            int popExitAnim = navOptions.getPopExitAnim();
            if (popEnterAnim != -1 || popExitAnim != -1) {
                popEnterAnim = popEnterAnim != -1 ? popEnterAnim : 0;
                popExitAnim = popExitAnim != -1 ? popExitAnim : 0;
                activity.overridePendingTransition(popEnterAnim, popExitAnim);
            }
        }
    }
public static void applyPopAnimationsToPendingTransition ( @ NonNull Activity activity ) { Intent intent = activity . getIntent ( ) ; if ( intent == null ) { return ; } Bundle bundle = intent . getBundleExtra ( KEY_NAV_OPTIONS ) ; if ( bundle != null ) { NavOptions navOptions = NavOptions . fromBundle ( bundle ) ; int popEnterAnim = navOptions . getPopEnterAnim ( ) ; int popExitAnim = navOptions . getPopExitAnim ( ) ; if ( popEnterAnim != - 1 || popExitAnim != - 1 ) { popEnterAnim = popEnterAnim != - 1 ? popEnterAnim : 0 ; popExitAnim = popExitAnim != - 1 ? popExitAnim : 0 ; activity . overridePendingTransition ( popEnterAnim , popExitAnim ) ; } } }
Apply any pop animations in the Intent of the given Activity to a pending transition.
Apply any pop animations in the Intent of the given Activity to a pending transition .