Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in dynamicCount #109

Open
hmaclean82 opened this issue Dec 18, 2018 · 1 comment
Open

Bug in dynamicCount #109

hmaclean82 opened this issue Dec 18, 2018 · 1 comment

Comments

@hmaclean82
Copy link

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();
        }
    }
@Phocacius
Copy link

I had the same problem. Easy workaround: call setViewPager again in your fragments onResume method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants