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
I am working on a project with 5 tabs. I have a Home tab, which displays a list of products. Clicking on any product takes you to the detail page. Initially, my problem was in navigating to the detail screen. It works perfectly with nested navigation, but I wanted to hide the bottom nav bar and top app bar.
Initially, I followed the approach mentioned in this discussion thread: #322.
It did work, but I had to pass lambda as a parameter to the screen, which caused crashes on Android due to java.lang.RuntimeException: Parcelable encountered IOException writing serializable object.
I quickly changed my approach and navigated to the DetailedScreen using the parent navigator: #204 (comment).
However, I am facing an issue where the screen state is not retained when navigating back on Android, although on iOS, the screen state is retained. This problem is also faced in rest of the tabs. Are there any fixes for this?
You can observe in the video that the list state is getting changed on Android. My current approach can be found here
problem.mp4
The text was updated successfully, but these errors were encountered:
techjd
changed the title
Screen State not getting reatined
Screen State not getting retained
Mar 22, 2024
All Voyager screen has to be serializable in a Bundle, this means that you need to all parameters of your Screen for Android to be or Java Serializable or Parcelable.
I am working on a project with 5 tabs. I have a Home tab, which displays a list of products. Clicking on any product takes you to the detail page. Initially, my problem was in navigating to the detail screen. It works perfectly with nested navigation, but I wanted to hide the bottom nav bar and top app bar.
Initially, I followed the approach mentioned in this discussion thread: #322.
It did work, but I had to pass lambda as a parameter to the screen, which caused crashes on Android due to
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object.
I quickly changed my approach and navigated to the DetailedScreen using the parent navigator: #204 (comment).
However, I am facing an issue where the screen state is not retained when navigating back on Android, although on iOS, the screen state is retained. This problem is also faced in rest of the tabs. Are there any fixes for this?
You can observe in the video that the list state is getting changed on Android. My current approach can be found here
problem.mp4
The text was updated successfully, but these errors were encountered: