I have a project based off the XPlatformMenus MvvmCross sample. The app is using one activity inherited from MvxCachingFragmentCompatActivity
. The app uses a NavigationView
sliding drawer to allow navigation to different fragments that are swapped out at runtime.
I have one fragment which displays a list using RecyclerView
. I can scroll down to the bottom of the list, hit the back button, then invoke the fragment again from the navigation menu, and the fragment is displayed exactly as it was (with the scrolled position at the bottom of the list). How can I make it so the fragment always starts as if it was created for the first time after I call ShowViewModel<TViewModel>
? I think I don't want this specific fragment to be cached, or I want to have some kind of event I can hook into to reset the ViewModel when the fragment is being displayed again. How can this problem be solved?