getFragmentManager到的是activity对所包含fragment的Manager,而如果是fragment嵌套fragment,那么就需要利用getChildFragmentManager()了。
在使用fragment时 遇到
getFragmentManager()和getChildFragmentManager()的使用,
getFragmentManager()是所在fragment 父容器的碎片管理,
getChildFragmentManager()是在fragment 里面子容器的碎片管理。
getFragmentManager到的是activity对所包含fragment的Manager,而如果是fragment嵌套fragment,那么就需要利用getChildFragmentManager()了。