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

Switching between fragments with data loading in the fragments crushes the app #65

Open
pkanyerezi opened this issue Jun 21, 2017 · 0 comments

Comments

@pkanyerezi
Copy link

Hey,

Am using this library with tabbed fragments. These fragments receive online data using retrofit.
The problem is when i launch the app and i immediately switch from the first fragment to the next fragment from the bottomoNavigation and the first fragment was still loading data the app crushes at the point where i inititialize the adaptar.

mAdapter = new CardViewAdapter(getContext(), R.layout.card_view, roundboboffers.getResponse().getDestinations());

But when i wait for the fragment to load data first it works fine.

i've tried to do this in the onCreateView() but all in the vein

    if (v == null) {
        v = inflater.inflate(R.layout.activity_main_hometest, container, false);
    }else{
        ((ViewGroup)v.getParent()).removeView(v);
    }
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

1 participant