I have been trying to find the cause and the solution for the loss of states and recreating the fragments of bottom navigation when I use LiveData and MutableLiveData data inside a fragment in NavigationController. and also the ViewModel also loses the data if initialized inside the fragment.
Tried every possible way but had no luck.
Currently, I am storing the data in a ViewModel inside activity to keep the data.
Hope anyone else has a solution
Thanks