androidandroid-fragmentsandroid-viewpagerpagerslidingtabstrip

Viewpager Fragments turning blank


Using a PagerSlidingTabStrip with a Viewpager inside of a fragment:

Any ideas?


Solution

  • I had a problem like that

    try this

    mPager.setAdapter(new BasePagerAdapter(getChildFragmentManager(), getResources()));
    

    you probably have this

    mPager.setAdapter(new BasePagerAdapter(getFragmentManager(), getResources()));
    

    EDIT: and in your BasePagerAdapter extend FragmentStatePagerAdapter

    public class BasePagerAdapter extends FragmentStatePagerAdapter {