多个相同布局的fragment
但是这些fragment里面的内容都不同(里面有个listview,listview内容不同)
如何定义才不用新建多个fragment类
该如何实例化呢?
------解决方案--------------------
public static class PlaceholderFragment extends Fragment {
public static PlaceholderFragment newInstance(Bundle bundle) {
PlaceholderFragment fragment = new PlaceholderFragment();
/*处理bundle传过来的数据*/
return fragment;
}
private PlaceholderFragment() {
}
}