如何防止BottomSheetDialogFragment在导航到另一个片段后解除?

问题描述

我在我的应用上使用 NavigationComponent

我有一个特定的流程,在点击 BottomSheetDialogFragment 按钮后,应用应导航到另一个片段。但是当该 Fragment 弹出时,我需要导航回上一个 BottomSheetDialogFragment

出于某种原因,BottomSheetDialogFragment 被自动关闭。

Frag A : click on a button  
Frag A -> Dialog B : click on a button  
Frag A -> Dialog B -> Frag C : pop Frag C from the stack  
Frag A : Dialog B was automatically dismissed =;/  

如何防止这种解雇?


问:为什么我需要 BottomSheetDialogFragment 不被解雇?
A:我通过LiveData来收听打开片段的结果。由于忽略了 BottomSheetDialogFragment,它永远不会收到结果。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)