我想知道如何在导航组件(AlreadyHaveaccountFragment)的主要片段和seconde片段(EmailVerificationFragment)之间正确导航吗? 目前,如果我单击“后退”按钮,则无法在backStack中找到主要片段,因此应用程序将关闭。
我在下面使用此代码
val toEmailVerificationBundle = Bundle()
toEmailVerificationBundle.putParcelable(BaseConstant.USER,userItem)
findNavController().navigate(R.id.gotomail,toEmailVerificationBundle,NavOptions.Builder()
.setPopUpTo(R.id.already_have_an_account_fragment,true).build())