I have an application with n buttons. Each button create a new fragment and attach it to a view. So if i touch button A, B, C in that order the fragments FA, FB and FC are created and stacked:
FA,FB,FC
Now if i press A again a new fragment is created and stacked, so the stack become:
FA,FB,FC -> FA,FB,FC,FA
Is there a way to retreive an existing fragment from the stack (if exist) and bring it to front? So if i have the stack
FA,FB,FC
and press the "A" button again, the FA fragment is removed from backstack and put to front:
FA,FB,FC -> FB,FC,FA
and if I press "C" the stack become
FB,FC,FA -> FB,FA,FC
Thanks in advance.