aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.84k stars 682 forks source link

AHBottomNavigationViewPager goes blank when switching fragment multiple times #407

Open ghost opened 5 years ago

ghost commented 5 years ago

I'm using AHBottomNavigation and when I switch to a certain fragment multiple times I just get a blank screen. using this line:

viewPager.setCurrentItem(viewPagerIndex, false); My FragmentPagerAdapter extends FragmentStatePagerAdapter. changing to FragmentPagerAdapter didn't help.

Changing viewPager.setOffscreenPageLimit(1-5); didn't help either.

Changing root layouts to FrameLayout didn't work.

I noticed many threads recommending using getChildFragmentManager instead of getSupportFragmentManager but this is not my case. I'm not using fragmentmanager inside a fragment just one activity.

juanxme commented 5 years ago

Same issue