navigation-keep-fragment-sample icon indicating copy to clipboard operation
navigation-keep-fragment-sample copied to clipboard

Navigate between tabs

Open smithaaron opened this issue 5 years ago • 3 comments

How would I navigate from a fragment in one tab to a fragment in a different tab, without using the bottom nav. For example if I want to add a button to the Notification fragment, which when pressed would navigate to the Detail fragment.

I have tried tis but get the error: java.lang.IllegalArgumentException: navigation destination com.star_zero.navigation_keep_fragment_sample:id/action_home_to_detail is unknown to this NavController

smithaaron avatar May 09 '19 12:05 smithaaron

I think the reason is action_home_to_detail is not included in nav_graph.xml.

I try to fix the issue, but I'm not sure I can. Please give me a time.

STAR-ZERO avatar May 11 '19 06:05 STAR-ZERO

@STAR-ZERO is it possible with implicit deeplink?

zhombie avatar Jul 03 '19 09:07 zhombie

Sorry, too late 🙇

I couldn't find a good solution. It's not a good solution, but I implemented it. https://github.com/STAR-ZERO/navigation-keep-fragment-sample/commit/0c7c5982a1ab0f7541c2df856c1f51fd3fc2025c

STAR-ZERO avatar Oct 13 '19 03:10 STAR-ZERO