You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigating between the Leaderboard and other tabs, the Leaderboard is recreated every single time you return. The recycler state should be retained. This is the same issue I'm having with my local app and was hoping that I was doing something wrong but it looks like this is just how Navigation works with a bottom nav?
Repro:
Select Leaderboard tab
Scroll to bottom of the list
Select Register tab
Select Leaderboard tab
Notice that we are scrolled back to the top
Even if I add onSaveInstanceState it never gets called.
The text was updated successfully, but these errors were encountered:
Actually, messing around more with this example, I realized it seems the state of the backstack doesnt work at all between tabs. Another example:
Select Home tab
Click 'About', which pushes a fragment onto the 'Home' stack
Select Leaderboard tab
Select Home tab
Notice that we are back on the main Home page, not the About page
I had this same issue locally when trying to setup sub navgraphs, and ended up having to abandon them as a design and use custom back button handling to keep "proper" state maintained.
Is this really working as intended? These all seem like bugs to me, and the most frustrating thing is that this is absolutely the "happy path" of app design. None of the 2 situations I describe seem abnormal, on the contrary it is how apps have been designed for at least a decade.
In NavigationAdvancedSample I Followed your given step and when select home tab again its still on About page .
But My issue is in my app fragment is recreated
Select Home Bottom Menu Scroll down
Click on Profile Bottom Menu
Now Select Home Bottom Menu again and Fragment recreated because Recyclerview position set on First position and also it's take 1 second white screen when back on Home Fragment
When navigating between the Leaderboard and other tabs, the Leaderboard is recreated every single time you return. The recycler state should be retained. This is the same issue I'm having with my local app and was hoping that I was doing something wrong but it looks like this is just how Navigation works with a bottom nav?
Repro:
Even if I add
onSaveInstanceState
it never gets called.The text was updated successfully, but these errors were encountered: