How to navigate fragment without adding it into backstack with NavController?
问题 NavController has methods navigate which navigate by default with backstack. How to navigate to the fragment without having backstack? Please note that, I am not asking about FragmentTransaction 回答1: If you have a back stack of: A -> B And want to get to a back stack of A -> C You can do a 'replace' operation by popping B off the back stack and adding C. In Navigation, this is done by using app:popUpTo (and optionally app:popUpToInclusive="true" if needed) to the <action> in your XML or by