我有3个标签,这些标签由以下代码创建:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mTabHost = new FragmentTabHost(getActivity());
mTabHost.setup(getActivity(), getChildFragmentManager(), R.layout.tab);
mTabHost.addTab(mTabHost.newTabSpec("TabA").setIndicator("tab1"),
ItemFragment.class, null);
mTabHost.addTab(mTabHost.newTabSpec("TabB").setIndicator("tab2"),
TrailerFragment.class, null);
mTabHost.addTab(mTabHost.newTabSpec("TabC").setIndicator("tab3"),
PicFragment.class, null);
mTabHost.addta
mTabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
@Override
public void onTabChanged(String s) {
}
});
return mTabHost;
}
在第一个标签中我从网上获取一些数据,当我选择第二个标签然后第一个标签再次加载数据时,如何解决?