I was looking at the example of the FragmentStatePagerAdapter at http://developer.android.com/reference/android/support/v4/app/FragmentStatePagerAdapter.html
public static class MyAdapter extends FragmentStatePagerAdapter {
public MyAdapter(FragmentManager fm) {
super(fm);
}
@Override
public int getCount() {
return NUM_ITEMS;
}
@Override
public Fragment getItem(int position) {
return ArrayListFragment.newInstance(position);
}
}
I've also looked around at other posts in stackoverflow, but I am still unsure as to how to add/remove pages from the fragmentStatePagerAdapter, and also how exactly the getItem method is called. So if I were looking to add a method to MyAdapter to add pages, how would that be done? Or is that not the standard way of adding pages? Any information is appreciated.