https://kotlinlang.org logo
f

FunkyMuse

03/03/2021, 9:33 PM
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

Gabriel Melo

03/03/2021, 11:25 PM
If you're not persisting your state, the OS might kill your process at any time. This might be why.
i

Ian Lake

03/04/2021, 12:46 AM
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

FunkyMuse

03/04/2021, 7:56 AM
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

sindrenm

03/04/2021, 9:00 AM
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

FunkyMuse

03/04/2021, 9:01 AM
All i'm using is rememberNavController extension function provided by Compose