使用ChildFragmentManager的底部表格,但在其他片段中打开
我使用导航,并
在home_fragment中显示底部表:
myBottomSheet!!.show(childFragmentManager, MyBottomSheet.TAG)
我认为Chainging sirpeeActivity()。支持fragmentManager
code> childfragmentManager 可以解决此问题。
但是,当我通过deeplink打开b_fragment时,它会打开splash-> login check-> home_fragment-> b_fragment
我期望的是,当home_fragment销毁时,我会自动解散对话框。但是b_fragment仍然活着(即使我在navigate()方法之前致电divion()
。 应用:启动Singletop =“ true”
。但这无效。
I use navigation and
I show BottomSheet in Home_Fragment like this:
myBottomSheet!!.show(childFragmentManager, MyBottomSheet.TAG)
I thought chainging requireActivity().supportFragmentManager
to childFragmentManager
can solve this problem.
But when I open B_Fragment by deeplink, it opens Splash->Login Check->Home_Fragment->B_Fragment
What I expected was dismissing the dialog automatically when Home_Fragment is destroyed. But B_Fragment is still alive(Even though I call dismiss() right before navigate() method.)
I am using Navigation and I tried with <dialog>
tag & app:launchSingleTop="true"
. But it didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论