With the current Bottom navigation view and the na...
# compose
f
With the current Bottom navigation view and the navigation compose artifact, once i leave the application and come back to it, the navigation is restarted, any workaround or I'm missing something?
g
If you're not persisting your state, the OS might kill your process at any time. This might be why.
i
What does 'leave the application and come back to it' mean? Hitting the system back button and then re-launching the app? That is supposed to clear any state. Hitting the Home button and then re-launching the app? That should keep your state already
f
When i leave my app, minimise it, (onPause/onStop) scenario, when i reopen it from recents the latest screen i opened (navigated to) isn't remembered.
s
How are you remembering your current tab state? You might want to use
rememberSaveable
instead of
remember
to make sure it survives fragment/activity recreations in case the system feels like killing and restoring them.
f
All i'm using is rememberNavController extension function provided by Compose