java - Remove a specific fragment by tag from the stack -


how can remove specific fragment stack?

for example, these fragments , in f right know.

a-> b -> c -> d ->e ->f

from f want remove c stack, when press button stack this:

f-> e -> d -> b ->a

i have tried this:

fragment fragment = context.getfragmentmanager().findfragmentbytag("c"); if (fragment != null) {   context.getfragmentmanager().begintransaction().remove(fragment).commit(); } 

which removes fragment stack still retained because when press frag d, able see frag b have press twice on frag b go frag a. seems fragment removed stack still retained.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -