0

I have in my activity a BottomNavigationView. I am trying to create a separate backstack for each item of BottomNavigationView. I used this answer to do the same but I am having problem saving the HashMap mStacks on screen rotation. As HashMap is serializable, I saved it in the outState bundle provided in onSaveInstanceState function but I got the error that one of the fragment lets say MyFragment in my app is not Serializable so what I did was implemented Serializable for MyFragment, but again I got the error that the FragmentAdapter present inside MyFragment is not serializable. Now I can't think of any way to save mStacks on screen rotation. Do you know any way to do so? Please help me

Kartik Watwani
  • 629
  • 8
  • 20

0 Answers0