Sep 1, 2018 · 1 min read
This article was helpful !
Instead of overriding destroyItem to remove and recreate the fragment, I override getItemId. So the tag of the fragment doesn’t have to be changed.
@Override
public long getItemId(int position) {
return super.getItemId(position % titles.size());
}So far, it works like a charm.