I am using android studio navigation component to create some fragments and switch between them using the actions. Problem is that each time I tap Back button to go back from a Fragment2 to Fragment1, Fragment one is recreated.
I want to avoid that.
I found solutions when one don't use navigation component and simply can replace ".replace" with ".add", but can't find any information on how to do the same with navigation component.