I have activity A that defines androidx.fragment.app.FragmentContainerView
with given navGraph in its layout. Starting point of nav graph is fragment F1 that has action to navigate to fragment F2 (action only has id and destination). Fragment F2 has action with id and popupTo
that specifies graph id of F1. This all works great until I change activity orientation by flipping device. After orientation change, when I execute F2 action, I get java.lang.IllegalStateException: no current navigation node
Why this happens and how to fix?
UPDATE: nav components bug. Solution here: <androidx.fragment.app.FragmentContainerView> vs <fragment> as a view for a NavHost