Suppose i have 4 fragments: A, B, C, X, and I can navigate between them in this way:
... -> A -> C -> X and ... -> B -> C -> X
But when I'm in fragment X call mNavController.navigateUp()
I want skip fragment C and go to fragment A or B. What I need to do?
UPD: I need solution only for Navigation Architecture Component https://developer.android.com/topic/libraries/architecture/navigation/ Thanks!