【发布时间】:2021-03-01 17:22:44
【问题描述】:
我的问题是一样的:Kill fragment in navigation controller
但我使用绑定,因为它正在获取 NPE,我没有要传递的 id
代码:点击提交按钮时,我这样做了,所以它来到 FragmentA,但是当我按下返回时,再次来到 C,而不是用户应该退出应用程序。
val action = CheckoutFragmentDirections.actionCheckoutFragmentToProductFragment()
findNavController().navigate(action)
【问题讨论】: