ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 210 forks source link

rootFragments and fragmentStackTags sizes mismatch when restoring the FragNavController from Bundle #219

Open youssefhassan opened 4 years ago

youssefhassan commented 4 years ago

Hello,

I bumped into an issue with the FragNavController especially after restoring the from savedInstanceState and having a dynamically changing number of tabs, that the rootFragments count is greater than the fragmentStacksTags so it throws IndexOutOfBoundsException with message "Can't switch to a tab that hasn't been initialized" .. is that expected behaviour?

Thanks,

ncapdevi commented 4 years ago

Hmm, definitely sounds like an issue. I will see if I can track it down.