本文介绍了导航架构组件 - 对话框片段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将新的导航架构组件与 DialogFragment 一起使用?我是否必须创建自定义导航器?
Is it possible to use the new Navigation Architecture Component with DialogFragment? Do I have to create a custom Navigator?
我希望将它们与导航图中的新功能一起使用.
I would love to use them with the new features in my navigation graph.
推荐答案
不,从 1.0.0-alpha01
版本开始,不支持将对话框作为导航图的一部分.您应该继续使用 show() 来显示一个 DialogFragment
.
No, as of the 1.0.0-alpha01
build, there is no support for dialogs as part of your Navigation Graph. You should just continue to use show() to show a DialogFragment
.
这篇关于导航架构组件 - 对话框片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!