当我第一次进入 fragment_A 时,一切正常。但是当我从其他片段跳回来时, fragment_A 不会显示任何内容。它变得完全空白。
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (mBaseView != null) {
ViewGroup parent = (ViewGroup) mBaseView.getParent();
if (parent != null)
parent.removeView(mBaseView);
}
try {
mBaseView= inflater.inflate(R.layout.fragment_patrol_map, container, false);
} catch (InflateException e) {
}
findView();
init();
return mBaseView;
}