Cara menghapus tumpukan navigasi setelah menavigasi ke fragmen lain di Android
navController.navigateUp();
android developer
navController.navigateUp();
inclusive boolean: true to also pop the given destination from
the back stack So, I set the inclusive to false because I don't
want to pop the current fragment from the stack
<action
android:id="@+id/action_loginFragment_to_employerMainFragment"
app:destination="@id/employerMainFragment"
app:popUpTo="@+id/loginFragment"
app:popUpToInclusive="false"/>