ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 210 forks source link

Go to root fragment from hidden stack #207

Closed evgenybozhko2 closed 5 years ago

evgenybozhko2 commented 5 years ago

How manage stack for hidden tab ? For example I want pop few levels back.

ncapdevi commented 5 years ago

Not sure that I understand the question, could you elaborate?

evgenybozhko2 commented 5 years ago

Have you tried to thinking? (joke). For example, we have two tabs with two stacks with hiding fragment strategy. When a user sees the first stack, the second one hidden. So I want to manage the hiden stack, for example, make a pop or go to root fragment into second not displayed stack. Does it possible? Thanks

ncapdevi commented 5 years ago

You can clear a stack that is not currently selected via fun clearStack(tabIndex: Int, transactionOptions: FragNavTransactionOptions? = defaultTransactionOptions) other than that, operations can only be performed on the current stack. You may want to rethink your UX, as popping fragments on non-visible stack is very strange navigation UX.

evgenybozhko2 commented 5 years ago

Thanks for the very long response. Nothing strange there, because it's a simple logout feature.

VuHongKy commented 4 years ago

@ncapdevi Please check this, bro and help me: https://github.com/ncapdevi/FragNav/issues/233#issue-616415495