There are 3 fragments: A , B , C.
I add(); to back stack in turn A , B , C through the add(); method add(); After this, I add the fragment A again and get such a stack: A , B , C , A.
How to achieve that when adding A , it disappeared from stack and was added from above?
I tried to look for it before adding it through the findFragmentByTag() method, and then remove it through remove() , but this does not lead to the desired result. The fragment loses visibility, but does not disappear from the stack.