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
Post a Comment