[英]Navigation Component: How to pop back to previous destination after navigate to a destination using deep link?
I navigate to a destination using deep link in another navigation graph我在另一个导航图中使用深层链接导航到目的地
Navigation.findNavController(view).navigate(Uri.parse(link));
And I just want to return to the previous destination.而我只想回到之前的目的地。
However, popBackStack() only restart the deep link destination但是,popBackStack() 只会重新启动深层链接目标
Navigation.findNavController(view).popBackStack();
How can I return to the previous destination if I insist to use deep link?非要用deep link怎么才能回到之前的目的地呢?
Check this.检查这个。 It might help.它可能会有所帮助。 https://developer.android.com/guide/navigation/navigation-deep-link#explicit https://developer.android.com/guide/navigation/navigation-deep-link#explicit
the start destination of the graph also added to the stack.图的起始目的地也添加到堆栈中。 So when you click on the back button, the start destination on the graph coming to the top of the stack.因此,当您单击后退按钮时,图表上的起始目的地会到达堆栈的顶部。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.