Closed xuexixuexijpg closed 2 years ago
Is it the wrong way for me to do this? The same is true for using withState
in the invalidate
callback in the fragment
This is the code that uses Google's ViewModel
, and returns the same data filled with MavericksViewModel
I still don't understand why Google's ViewModel
can save the scroll position without setting this property. But it solved the problem, thank you very much~
This has nothing to do with ViewModel, it has to do with the fact that RecyclerView has no items at the point in which it tries to restore scroll state.
Hello, I used this library as an exercise, I found a problem, when I return from the current
fragment
to the previousfragment
, the scroll state of the previousfragment
list is not saved, because theMavericksViewModel
is not saved to the fragment status? But using Google'sViewModel
preserves the original scroll state. Is there any way or api to solve it? In addition, I did not useepoxy
to build, because I practiced a single activity architecture, usingepoxy
infragment
to report adapter leaks and the memory seems to increase rapidly. The currently used version of navigation and viewmodel is 2.5.0-rc01, the version of fragment is 1.5.0-rc01, and the version of mavericks is 2.7. Or is there anyone with the same problem? Is there any good solution? thanks