简体   繁体   English

防止在触摸外部时关闭加载有导航组件的对话框片段

[英]Prevent dismissal of dialogfragment loaded with navigation component on touch outside

I've been using the navigation component to load all my views including dialog fragments.我一直在使用navigation component来加载我的所有视图,包括对话框片段。 For some of them, I don't want them to be dismissable when the user touches outside.对于其中一些,我不希望它们在用户触摸外部时被解雇。

Is there a flag I can pass to prevent this from happening?有没有我可以通过的标志来防止这种情况发生?

I figured out that setting isCancellable = false will do the trick.我发现设置isCancellable = false可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM