app/src/main/java/com/adamg/materialtemplate/navigator/Navigator.java
private void navigateWithTransaction(final Fragment fragment, final View view, final boolean addToBackStack) {
        // Set the arguments
        setArguments(fragment);

        // Navigate without adding to the back stack as we do not expect that behaviour
        final FragmentTransaction transaction = mActivityContext.getFragmentManager().beginTransaction();

        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            transaction.addSharedElement(view, view.getTransitionName());
        }

        navigate(fragment, transaction, addToBackStack);
    }
/**
     * Navigate to a fragment with a shared element transaction
     *
     * @param fragment       fragment reference, should be of the concrete type
     * @param addToBackStack true to add to the back stack, false otherwise
     * @param view           View containing the shared elements for the transition
     */
Navigate to a fragment with a shared element transaction
@param fragment       fragment reference, should be of the concrete type
@param addToBackStack true to add to the back stack, false otherwise
@param view           View containing the shared elements for the transition
Navigate to a fragment with a shared element transaction @param fragment fragment reference should be of the concrete type @param addToBackStack true to add to the back stack false otherwise @param view View containing the shared elements for the transition
private void navigateWithTransaction(final Fragment fragment, final View view, final boolean addToBackStack) {
        setArguments(fragment);
        final FragmentTransaction transaction = mActivityContext.getFragmentManager().beginTransaction();
        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            transaction.addSharedElement(view, view.getTransitionName());
        }
        navigate(fragment, transaction, addToBackStack);
    }
private void navigateWithTransaction ( final Fragment fragment , final View view , final boolean addToBackStack ) { setArguments ( fragment ) ; final FragmentTransaction transaction = mActivityContext . getFragmentManager ( ) . beginTransaction ( ) ; if ( android . os . Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) { transaction . addSharedElement ( view , view . getTransitionName ( ) ) ; } navigate ( fragment , transaction , addToBackStack ) ; }
Navigate to a fragment with a shared element transaction
 @param fragment       fragment reference, should be of the concrete type
 @param addToBackStack true to add to the back stack, false otherwise
 @param view           View containing the shared elements for the transition
Navigate to a fragment with a shared element transaction @param fragment fragment reference should be of the concrete type @param addToBackStack true to add to the back stack false otherwise @param view View containing the shared elements for the transition
// Set the arguments // Navigate without adding to the back stack as we do not expect that behaviour