{ super.onCreate(savedInstanceState) // setup transition val backward = MaterialSharedAxis(MaterialSharedAxis.X, false) reenterTransition = backward val forward = MaterialSharedAxis(MaterialSharedAxis.X, true) exitTransition = forward } // EndFragment.kt override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // setup transition val forward = MaterialSharedAxis(MaterialSharedAxis.X, true) enterTransition = forward val backward = MaterialSharedAxis(MaterialSharedAxis.X, false) returnTransition = backward }