0

I use Android jitpack navigation in the project. In the first fragment, I show the list in recyclerview. When I click on the item, I show the second fragment. But when I go back to the first fragment, recyclerview refreshes the old list. How do I not refresh the list?

1 Answers1

1

You should use ViewModel to keep list through navigation. Provide the list to your fragment using LiveData and observe it in the fragment's onViewCreated() method