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 -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -