When postponing a fragment's enter transition when using Navigation Architecture the "home" fragment in the graph is visible for a microsecond. After googling a bit, the docs tell me to set setReorderingAllowed(true) on the fragmentManager to optimize this flow. However, the docs do not use the Navigation Architecture Component.
Will setReorderingAllowed(true) and how can I achieve it when using Navigation Architecture Component?
setReorderingAllowed(true) is set automatically when using naivate(). See FragmentNavigator implementation:
    public NavDestination navigate(@NonNull Destination destination, @Nullable Bundle args,
            @Nullable NavOptions navOptions, @Nullable Navigator.Extras navigatorExtras) {
        // OTHER CODE
        // OTHER CODE
        ft.setReorderingAllowed(true);
        ft.commit();
        // The commit succeeded, update our view of the world
        if (isAdded) {
            mBackStack.add(destId);
            return destination;
        } else {
            return null;
        }
    }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With