Fragment as a singleton in Android
问题 General Question Can I define Fragments as Singletons? Specific question In my application I have one 'FragmentActivity' with a FragmentPager which has two Fragments, FragmentA and FragmentB . I defined the fragments as Singletons in the FragmentA extends Fragment class: private static instance = null; public static FragmentA getInstance() { if (instance == null) { instance = new FragmentA(); } return instance; } private FragmentA() {} and in my FragmentPagerAdapter : @Override public