FragmentTabHost简单保存状态的方法

private View rootView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

if (rootView == null){
rootView = inflater.inflate(R.layout.fragment_on_visit, container, false);
ButterKnife.bind(this, rootView);
init();
}else {
return rootView;
}
return rootView;
}
posted @ 2016-12-07 09:47  黑色秋梨膏  阅读(146)  评论(0编辑  收藏  举报