nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } fragmentManager.commit { setReorderingAllowed(true) replace(requireNotNull(containerId), clazz.newInstance().apply { arguments = args }) addToBackStack(menuId.toString()) }