Closed zunjae closed 3 years ago
I notice that the Pokedex sample app has the same behavior, very interesting.
I don't know a single app in existence with this unusual behavior. Why would you want to recreate a screen and lose all state? I've been developing for android for 6 years now and I've made apps used by over a million people and this is the first time I'm seeing this.
Fixed by switching to another library
Fixed by switching to another library
Which one?
Fixed by switching to another library
Which one?
Any library will work. Just avoid this one as it's riddled with bugs and the developer seems to be dead
Any library will work. Just avoid this one as it's riddled with bugs and the developer seems to be dead
For me, this library works well and without problems, but I like the functionality you mentioned. If there are other libraries that implement the same behavior, maybe the author or someone else can implement the same approach here. Can you point me to any specific jetpack compose library with that functionality?
Can you point me to any specific jetpack compose library with that functionality?
It's built into Jetpack Compose called "state". It allows stateless widgets to remember its state. Every time I use this compose-router library it seems to "forget" the state and recreate the entire view from scratch. Once I removed this library, the state is remembered again.
For me, this library works well and without problems
That seems to be factually incorrect. You can even try out the sample apps made by the same developer. You will see the same issue there where navigating back, the view and its (scroll) state is recreated entirely.
We have different opinions, that's ok. Anyway, can you point me to any specific jetpack compose library with that functionality? I think that the standard compose navigation can do this with scoped view models but I am not sure, and it doesn't support animations, which are supported by compose-router when used in combination with compose-backstack. Therefore, I am genuinely interested in knowing other libraries that do support this.
Sorry, I am not willing to discuss with someone who sees incorrect facts as "different opinion". Consider yourself blocked.
Assuming you have two destinations, A and B. A displays a long list. You click on an item in the list to navigate to B. Once in B you click on the back button. The A view is entirely recreated. The list is at the top again. I am unsure if this is by design or not.
I've already added a
rememberLazyListState
but this seems to be recreated entirely as wellI am using version 0.24.2