I am using FragmentStatePagerAdapter in my app. My problem is that when I am doing notifyDataSetChanged() it's calling only the getCount() and not the getItem(). the getCount is not returning 0. this is my FragmentStatePagerAdapter:
private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
public ScreenSlidePagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public CharSequence getPageTitle(int position) {
return titles.get(position);
}
@Override
public Fragment getItem(int position) {
return fragmentList.get(position);
}
@Override
public int getCount() {
return fragmentList.size();
}
}
How could it be that after pagerAdapter.notifyDataSetChanged();
only the getCount() is called and the getItem(int position)
is not being called after it?
Thanks!