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?
Asked
Active
Viewed 44 times
1 Answers
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

Armel Gildas Fagbedji
- 140
- 9