mvarnagiris / compose-navigation

Apache License 2.0
65 stars 4 forks source link

Backstack like Instagram/Youtube #3

Open handiwiguna opened 3 years ago

handiwiguna commented 3 years ago

Just like instagram/youtube, does this navigation library support below functionality?

  1. Multiple backstack
  2. Remove duplicate item in root backstack (bottom navigation)

Thank you.

mvarnagiris commented 3 years ago
  1. It does support multiple backstacks. There is a sample. One thing that it does not do is restore sub-backstack once you return to it. So if you have bottom tabs. Navigate in first tab, then switch to another tab and go back to first tab, history there will be lost and you will be on first screen of that tab. You can run sample app to see how it's working
mvarnagiris commented 3 years ago

I don't understand your second question though

handiwiguna commented 3 years ago

Basically my intention is to have a multiple sub backstack like Youtube bottom navigation.

For example: Home (1st tab Bottom Nav) > Explore (2nd tab Bottom Nav) > Trending > Library (3rd tab Bottom Nav) > History > Explore (2nd tab Bottom Nav) > Library (3rd tab Bottom Nav)

Then if click Explore (2nd tab Bottom Nav) again, it will show Trending screen , when i click back button: it will show Explore (2nd tab Bottom Nav) > History > Library (3rd tab Bottom Nav) > Home

Regarding to question number 2, on above example, the Explore & History stack only appear once though I click many times.

mvarnagiris commented 3 years ago

So I think at the moment that is not possible because when you switch tabs - backstack from previous tab is cleared