popBackStack causes calling oncreateView of fragment again and again
问题 I have 3 fragment A, B,C.I wrote piece of code for replacing them and maintaining backstack: public void addFragment(Fragment fragmentToAdd, String fragmentTag) { FragmentManager supportFragmentManager = getSupportFragmentManager(); Fragment activeFragment = getActiveFragment(); FragmentTransaction fragmentTransaction = supportFragmentManager .beginTransaction(); if (null != activeFragment) { fragmentTransaction.hide(activeFragment); } fragmentTransaction.replace(R.id.layout_child_activity,