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.
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.