ncapdevi / FragNav

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

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

Open youssefhassan opened 5 years ago

youssefhassan commented 5 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 5 years ago

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