注意这里是用Activity嵌套在Fragment里面的 就有在MainActivity才能用
getSupportFragmentManager().beginTransaction().replace(R.id.content, new FindFragment()).commitAllowingStateLoss();
其它的Fragment都要用
getChildFragmentManager().beginTransaction().replace(R.id.show_content, ShowDataFragment.newInstance(type, sex)).commitAllowingStateLoss();
就可以解决这个问题了