Unable to pop the Navigation Library's back stack
1
I have some trouble with popping the back stack when using the navigation library. I have the following flow Secondary Graph FragSecondA -> FragSecondB Main Graph FragMainA -> FragMainB -> FragMainC -> SecondaryGraph I'd like to clear FragMainA, FragMainB, FragMainC from the back stack once I reach FragSecondA. I tried using setting app:popUpTo="@id/fragment_main_c" app:popUpToInclusive="true" on the action that leads to the Secondary Graph. Using the code I mentioned will only pop FragMainC from the back stack leaving me to navigate back to FragMainB. I tried setting app:clearTask=true which gets me the desired result, however this method as deprecated. Does anyone have any suggestions as to how I might fix this issue without having to use the deprecate