Open hmaclean82 opened 5 years ago
when coming back to screen with viewpager, the initialisation of count does not work because the adapter is not yet linked to the viewpager and this code then results in fallback to DEFAULT_COUNT:
private int getViewPagerCount() { if (viewPager != null && viewPager.getAdapter() != null) { return viewPager.getAdapter().getCount(); } else { return manager.indicator().getCount(); } }
I had the same problem. Easy workaround: call setViewPager again in your fragments onResume method.
setViewPager
onResume
when coming back to screen with viewpager, the initialisation of count does not work because the adapter is not yet linked to the viewpager and this code then results in fallback to DEFAULT_COUNT: