reorder pages in FragmentStatePagerAdapter using getItemPosition(Object object)
I believe that FragmentStatePagerAdapter does not behave correctly when overriding getItemPosition(Object object) with the purpose of reordering the pages. Below is a simple example. In the initial state, the order of the pages is {A, B, C}. Upon calling toggleState() , the order of the pages changes to {A, C, B}. By overriding getItemPosition(Object object) , we ensure that the current page being viewed (A, B, or C) does not change. public static class TestPagerAdapter extends FragmentStatePagerAdapter { private boolean mState = true; public TestPagerAdapter(FragmentManager fragmentManager) {